QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#375807 | #5533. Trick | sichengzhou# | 0 | 0ms | 3944kb | C++14 | 750b | 2024-04-03 16:07:25 | 2024-07-04 03:33:26 |
answer
#include<bits/stdc++.h>
using namespace std;
const int N=10;
int n,R,a[N];
int main()
{
scanf("%d%d",&n,&R);
if(R<=2)
{
int x=0;
for(int i=1;i<=n;i++)
{
scanf("%d",&a[i]);x+=a[i];x%=(2*n+1);
}
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
if(i!=j&&(a[i]-a[j]+2*n+1)%(2*n+1)==x)
{
printf("%d %d\n",a[i],a[j]);
return 0;
}
}
}
}else{
for(int i=1;i<=4;i++)
{
scanf("%d",&a[i]);
}
printf("%d\n",((-(a[1]-a[2]+a[3]-a[4]))%(2*n+1)+2*n+1)%(2*n+1));
}
return 0;
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 0kb,3900kb
input:
12012 1 6 0 1 2 3 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4 6 6 0 1 2 3 4 6 6 0 1 2 3 4 6 6 0 1 2 3 4 6 6 0 1 2 3 4 6 6 0 1 2 3 4 6 6 0 1 2 3 4 6 6 0 1 2 3 5 6 6 0 1 2 3 5 6 6 0 1 2 3 5 6 6 0 1 2 3 5 6 6 0 1 2 3 5 6 6 0 1 2 3 5 6 6 0 1 2 3 5 ...
output:
input:
12012 2 6 7 8 9 10 11 12 6 6 8 9 10 11 12 6 6 7 9 10 11 12 6 6 7 8 10 11 12 6 6 7 8 9 11 12 6 6 7 8 9 10 12 6 6 7 8 9 10 11 6 7 8 9 10 11 12 6 5 8 9 10 11 12 6 5 7 9 10 11 12 6 5 7 8 10 11 12 6 5 7 8 9 11 12 6 5 7 8 9 10 12 6 5 7 8 9 10 11 6 7 8 9 10 11 12 6 4 8 9 10 11 12 6 4 7 9 10 11 12 6 4 7 8 1...
output:
6 9
input:
12012 3 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 420303592 32636 6 9 6 4203...
output:
1631
result:
wrong answer the card you returned is 1631, but expected 6 (test case 1)
Subtask #2:
score: 0
Skipped
Subtask #3:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 0kb,3944kb
input:
6525 1 6 10 1 11 3 12 6 6 1 7 10 12 5 6 6 0 10 12 7 9 8 6 12 1 8 4 7 11 6 11 8 9 4 10 6 6 0 7 2 3 4 5 6 0 8 3 10 11 6 6 0 1 2 4 7 6 6 0 1 11 9 5 6 6 7 1 12 8 6 5 7 0 1 13 10 12 5 6 7 0 14 2 3 4 12 6 7 11 1 3 8 12 6 13 7 0 1 2 3 13 5 14 7 11 9 10 8 4 14 7 7 0 8 14 3 4 13 11 7 0 10 2 14 8 5 6 7 0 13 2...
output:
1 12
input:
6525 2 6 0 2 4 5 8 9 6 2 3 4 8 9 11 6 1 2 3 4 5 11 6 0 3 5 6 9 10 6 0 1 3 5 7 12 6 1 6 8 10 11 12 6 2 4 5 7 9 12 6 5 8 9 10 11 12 6 3 4 7 8 10 12 6 0 2 3 4 9 11 7 2 3 4 7 8 9 11 7 1 5 7 8 9 10 13 7 0 4 5 7 9 10 14 7 4 6 7 8 9 10 11 7 0 1 2 3 5 6 13 7 1 2 5 7 9 10 12 7 1 3 4 9 11 12 13 7 1 3 4 6 10 1...
output:
6 2
input:
6525 3 6 1 12 6 2 6 1 12 6 2 6 1 12 6 2 6 1 12 6 2 6 1 12 6 2 6 1 12 6 2 6 1 12 6 2 6 1 12 6 2 6 1 12 6 2 6 1 12 6 2 7 1 12 6 2 7 1 12 6 2 7 1 12 6 2 7 1 12 6 2 7 1 12 6 2 7 1 12 6 2 7 1 12 6 2 7 1 12 6 2 7 1 12 6 2 7 1 12 6 2 8 1 12 6 2 8 1 12 6 2 8 1 12 6 2 8 1 12 6 2 8 1 12 6 2 8 1 12 6 2 8 1 12 ...
output:
13040
result:
wrong answer the card you returned is 13040, but expected 7 (test case 1)
Subtask #4:
score: 0
Skipped