Code
#include <bits/stdc++.h>
using namespace std;
void code(int n)
{
}
void debug(int n, int m)
{
}
int main()
{
int t;
cin>>t;
int x,y;
for(int i=0;i<t;i++)
{
cin>>x>>y;
if(x>1&&y>1)
{
cout<<1;
}
else
{
cout<<-1;
}
cout<<"\n";
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1235 A. Valid Integer
- Contest
- Happy New Year 2026
- Language
- C++11 (G++ 13.2.0)
- Submit At
- 2026-01-06 14:45:50
- Judged At
- 2026-01-06 14:45:50
- Judged By
- Score
- 100
- Total Time
- 4ms
- Peak Memory
- 532.0 KiB