QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#295246 | #5255. Greedy Drawers | LaStataleBlue | AC ✓ | 0ms | 3812kb | C++23 | 1.1kb | 2023-12-30 21:44:21 | 2023-12-30 21:44:23 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void solve(int t){
int n;
cin>>n;
vector<pair<int,int>> a,b;
int lato1=5,lato2=2;
int num=11;
while(a.size()+num<=n && lato1<=499){
for(int i=0;i<4;i++){
a.push_back({lato2,lato1});
}
a.push_back({lato2+lato2,lato1});
for(int i=0;i<5;i++){
a.push_back({lato1,lato2});
}
a.push_back({lato1,lato2+lato2});
for(int i=0;i<5;i++){
b.push_back({lato1,lato2});
b.push_back({lato2,lato1});
}
b.push_back({lato2+lato2,lato2+lato2});
lato1*=1;
lato2*=1;
}
while(a.size()<n){
a.push_back({1,1});
b.push_back({1,1});
}
for(auto [i,j] : b){
cout<<i+500<<" "<<j<<"\n";
}
for(auto [i,j] : a){
cout<<i+500<<" "<<j<<"\n";
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int t=1;
//cin>>t;
for(int i=1;i<=t;i++)solve(i);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3580kb
input:
150
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #2:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
151
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #3:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
152
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #4:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
153
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #5:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
154
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #6:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
155
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #7:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
156
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #8:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
157
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #9:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
158
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #10:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
159
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #11:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
160
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #12:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
161
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #13:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
162
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #14:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
163
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #15:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
164
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #16:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
165
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #17:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
166
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #18:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
167
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #19:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
168
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy
Test #20:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
250
output:
505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 505 2 502 5 504 4 505 2 502 5 505 2 502 5 505 2 502 5 ...
result:
ok you killed Janko's strategy