/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Accepted 1ms 532.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define all(x) (x).begin(), (x).end()
#define f(i, n) for (int i = 0; i < n; i++)
#define trace(x) cerr << #x << ": " << x << '\n'
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;cin>>t;
    while (t--)
    {
        int a,b;cin>>a>>b;
        if(a>b)swap(a,b);
        if(a==1){
            cout<<"-1\n";
            continue;
        }
        cout<<"1\n";
        l2:;
    }
    
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1235 A. Valid Integer
Contest
Happy New Year 2026
Language
C++17 (G++ 13.2.0)
Submit At
2026-01-06 14:32:15
Judged At
2026-01-06 14:32:15
Judged By
Score
100
Total Time
1ms
Peak Memory
532.0 KiB