QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#587035 | #9381. 502 Bad Gateway | eastcloud# | WA | 63ms | 3800kb | C++20 | 921b | 2024-09-24 17:12:42 | 2024-09-24 17:12:42 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
#define pi pair<int,int>
#define vi vector<int>
#define cpy(x,y,s) memcpy(x,y,sizeof(x[0])*(s))
#define mset(x,v,s) memset(x,v,sizeof(x[0])*(s))
#define all(x) begin(x),end(x)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ary array
using namespace std;
int read(){
int x=0,f=1;char ch=getchar();
while(ch<'0' || ch>'9')f=(ch=='-'?-1:f),ch=getchar();
while(ch>='0' && ch<='9')x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
return x*f;
}
void write(int x){
if(x<0)x=-x,putchar('-');
if(x/10)write(x/10);
putchar(x%10+'0');
}
void solve(){
int x=read();x++;
if(x&1)printf("%d 2\n",x);
else printf("%d 1\n",x/2);
}
int main(){
#ifdef EAST_CLOUD
freopen("a.in","r",stdin);
//freopen("a.out","w",stdout);
#endif
int T=read();while(T--)solve();
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3756kb
input:
3 1 2 3
output:
1 1 3 2 2 1
result:
ok 3 lines
Test #2:
score: -100
Wrong Answer
time: 63ms
memory: 3800kb
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'