QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#644321#9381. 502 Bad GatewayTheShuMo#WA 307ms3652kbC++14817b2024-10-16 13:10:252024-10-16 13:10:26

Judging History

你现在查看的是最新测评结果

  • [2024-10-16 13:10:26]
  • 评测
  • 测评结果:WA
  • 用时:307ms
  • 内存:3652kb
  • [2024-10-16 13:10:25]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
#define pb push_back
namespace IO {
    #define int long long 
    #define gh getchar
    inline int read(){char ch=gh();int x=0;bool t=0;while(ch<'0'||ch>'9')   t|=ch=='-',ch=gh();while(ch>='0'&&ch<='9') x=x*10+(ch^48),ch=gh();return t?-x:x;}
    inline char getc(){char ch=gh();while(ch<'a'||ch>'z') ch=gh();return ch;}
    inline void write(int x){if(x < 0){putchar('-');x = -x;}if(x > 9){write(x / 10);}putchar((x % 10 + '0'));}
}
using namespace IO;
using namespace std;
const int Maxn = 100010, mod = 1e8;

signed main(){
    int t = read();
    while(t--){
        int n = read() - 1;
        if(n % 2 == 0){
            cout << 1 + n / 2 << ' ' << 1 << endl;
        }else {
            cout << n + 2 << ' ' << 2 << endl;
        }
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3620kb

input:

3
1
2
3

output:

1 1
3 2
2 1

result:

ok 3 lines

Test #2:

score: -100
Wrong Answer
time: 307ms
memory: 3652kb

input:

1000000
1
1000000000
1
1
1000000000
1
1000000000
1
1
1
1000000000
1
1
1000000000
1
1000000000
1000000000
1
1000000000
1
1
1000000000
1
1000000000
1000000000
1
1000000000
1000000000
1000000000
1000000000
1000000000
1000000000
1
1
1000000000
1
1000000000
1000000000
1000000000
1000000000
1
1
1
10000000...

output:

1 1
1000000001 2
1 1
1 1
1000000001 2
1 1
1000000001 2
1 1
1 1
1 1
1000000001 2
1 1
1 1
1000000001 2
1 1
1000000001 2
1000000001 2
1 1
1000000001 2
1 1
1 1
1000000001 2
1 1
1000000001 2
1000000001 2
1 1
1000000001 2
1000000001 2
1000000001 2
1000000001 2
1000000001 2
1000000001 2
1 1
1 1
1000000001 ...

result:

wrong answer 2nd lines differ - expected: '1999961560 44721', found: '1000000001 2'