QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#375811#5533. Tricksichengzhou#0 4ms3864kbC++14813b2024-04-03 16:08:122024-07-04 03:33:29

Judging History

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

  • [2024-07-04 03:33:29]
  • 评测
  • 测评结果:0
  • 用时:4ms
  • 内存:3864kb
  • [2024-04-03 16:08:12]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N=10;
int n,R,a[N];
int main()
{
    int T;
    scanf("%d%d",&T,&R);
    while(T--)
    {
    scanf("%d",&n);
    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: 4ms = 0ms + 4ms
memory: 0kb,3788kb

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:

2 0

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:

12 7

input:

12012
3
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 12 7
6
2 0 ...

output:

6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
...

result:

wrong answer the card you returned is 6, but expected 7 (test case 2)

Subtask #2:

score: 0
Skipped

Subtask #3:

score: 0
Wrong Answer

Test #11:

score: 0
Wrong Answer
time: 2ms = 0ms + 2ms
memory: 0kb,3864kb

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:

10 6

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:

2 0

input:

6525
3
6
10 6 2 0
6
10 6 2 0
6
10 6 2 0
6
10 6 2 0
6
10 6 2 0
6
10 6 2 0
6
10 6 2 0
6
10 6 2 0
6
10 6 2 0
6
10 6 2 0
7
10 6 2 0
7
10 6 2 0
7
10 6 2 0
7
10 6 2 0
7
10 6 2 0
7
10 6 2 0
7
10 6 2 0
7
10 6 2 0
7
10 6 2 0
7
10 6 2 0
8
10 6 2 0
8
10 6 2 0
8
10 6 2 0
8
10 6 2 0
8
10 6 2 0
8
10 6 2 0
8
10 6 ...

output:

7
7
7
7
7
7
7
7
7
7
9
9
9
9
9
9
9
9
9
9
11
11
11
11
11
11
11
11
11
11
13
13
13
13
13
13
13
13
13
13
15
15
15
15
15
15
15
15
15
15
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17
17...

result:

wrong answer the card you returned is 7, but expected 0 (test case 2)

Subtask #4:

score: 0
Skipped