QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#320153 | #7619. Make SYSU Great Again I | ushg8877# | TL | 667ms | 38628kb | C++20 | 494b | 2024-02-03 14:12:10 | 2024-02-03 14:12:11 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MP make_pair
mt19937 rnd(time(0));
int n,k;
set<pair<int,int> > se;
int main(){
ios::sync_with_stdio(false);
cin>>n>>k;
for(int i=1;i<=2*n;i++){
int x=(i+1)/2,y=(i==2*n?1:i/2+1);
cout<<x<<' '<<y<<endl;
se.insert(MP(x,y));
}
for(int i=2*n+1;i<=k;i++){
int x=rnd()%n+1,y=rnd()%n+1;
while(se.count(MP(x,y))) x=rnd()%n+1,y=rnd()%n+1;
cout<<x<<' '<<y<<endl;
se.insert(MP(x,y));
}
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3684kb
input:
3 6
output:
1 1 1 2 2 2 2 3 3 3 3 1
result:
ok The answer is correct.
Test #2:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
3 7
output:
1 1 1 2 2 2 2 3 3 3 3 1 2 1
result:
ok The answer is correct.
Test #3:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
2 4
output:
1 1 1 2 2 2 2 1
result:
ok The answer is correct.
Test #4:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
3 9
output:
1 1 1 2 2 2 2 3 3 3 3 1 2 1 1 3 3 2
result:
ok The answer is correct.
Test #5:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
10 20
output:
1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 1
result:
ok The answer is correct.
Test #6:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
10 100
output:
1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 1 2 5 9 6 2 1 7 6 10 3 6 4 3 8 8 5 10 9 5 10 10 2 1 6 6 1 8 10 8 6 4 10 4 9 9 1 8 2 9 2 7 1 5 9 10 8 3 6 2 10 7 2 8 1 7 3 4 3 1 4 10 5 9 5 3 7 1 10 4 6 4 2 7 5 4 8 6 8 2 6 5 2 9 7 5 7 1 3 1 9 3 9 8 3 2 9 4 7 10 7 1 5 4...
result:
ok The answer is correct.
Test #7:
score: 0
Accepted
time: 1ms
memory: 3796kb
input:
32 64
output:
1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29...
result:
ok The answer is correct.
Test #8:
score: 0
Accepted
time: 210ms
memory: 22416kb
input:
200000 400000
output:
1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29...
result:
ok The answer is correct.
Test #9:
score: 0
Accepted
time: 667ms
memory: 38628kb
input:
200000 745589
output:
1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29...
result:
ok The answer is correct.
Test #10:
score: -100
Time Limit Exceeded
input:
199999 978736
output:
1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29...