QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#754530#9381. 502 Bad Gatewaymoanhehe666233#WA 116ms1616kbC++23263b2024-11-16 15:15:152024-11-16 15:15:16

Judging History

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

  • [2024-11-16 15:15:16]
  • 评测
  • 测评结果:WA
  • 用时:116ms
  • 内存:1616kb
  • [2024-11-16 15:15:15]
  • 提交

answer

#include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
	int n;
	scanf("%d",&n);
	int a;
	for(int i = 1; i <= n; ++ i){
		scanf("%d",&a);
		if((a+1)%2){
			printf("%d %d\n",a+1,2);
		}
		else{
			printf("%d 1\n",(a+1)/2,1);
		}
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1
2
3

output:

1 1
3 2
2 1

result:

ok 3 lines

Test #2:

score: -100
Wrong Answer
time: 116ms
memory: 1616kb

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'