QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#294034#5255. Greedy DrawersLaStataleBlue#AC ✓1ms3568kbC++231.1kb2023-12-30 02:43:252023-12-30 02:43:25

Judging History

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

  • [2023-12-30 02:43:25]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3568kb
  • [2023-12-30 02:43:25]
  • 提交

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*=3;
        lato2*=3;
    }
    
    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: 1ms
memory: 3444kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #2:

score: 0
Accepted
time: 1ms
memory: 3484kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #3:

score: 0
Accepted
time: 1ms
memory: 3448kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #4:

score: 0
Accepted
time: 0ms
memory: 3568kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #5:

score: 0
Accepted
time: 1ms
memory: 3456kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #6:

score: 0
Accepted
time: 1ms
memory: 3524kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #7:

score: 0
Accepted
time: 0ms
memory: 3488kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #8:

score: 0
Accepted
time: 0ms
memory: 3444kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #9:

score: 0
Accepted
time: 1ms
memory: 3516kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #10:

score: 0
Accepted
time: 1ms
memory: 3460kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #11:

score: 0
Accepted
time: 0ms
memory: 3452kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #12:

score: 0
Accepted
time: 0ms
memory: 3500kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #13:

score: 0
Accepted
time: 1ms
memory: 3444kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #14:

score: 0
Accepted
time: 1ms
memory: 3448kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #15:

score: 0
Accepted
time: 1ms
memory: 3456kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #16:

score: 0
Accepted
time: 0ms
memory: 3436kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #17:

score: 0
Accepted
time: 1ms
memory: 3444kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #18:

score: 0
Accepted
time: 0ms
memory: 3524kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #19:

score: 0
Accepted
time: 1ms
memory: 3500kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy

Test #20:

score: 0
Accepted
time: 0ms
memory: 3544kb

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
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
515 6
506 15
512 12
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
545 18
518 45
536 36
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
635 54
554 135
608 108
90...

result:

ok you killed Janko's strategy