Submission #1043919

#TimeUsernameProblemLanguageResultExecution timeMemory
1043919vjudge1Pick (COI18_pick)C++17
10 / 100
0 ms348 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long int const N=2e5+5; int const mod=1e9+7; void solve1(int h,int v){ h/=2; v/=2; cout<<0<<' '<<0<<endl; for(int x=1;x<=h;x++) cout<<x<<' '<<0<<endl; for(int x=h;x>=1;x--) cout<<x<<' '<<1<<endl; for(int y=2;y<=v;y++) cout<<1<<' '<<y<<endl; for(int y=v;y>=1;y--) cout<<0<<' '<<y<<endl; } void solve2(int p,int n){ p/=2; n/=2; for (int i = 0; i <=p; ++i) cout<<i<<' '<<i<<endl; for(int i=p-1;i>=0;i--) cout<<i<<' '<<i+2<<endl; for (int i = 1; i<n; ++i) cout<<-i<<' '<<i+2<<endl; for (int i = n; i>=1; --i) cout<<-i<<' '<<i<<endl; } int main(){ int a,b,c,d; cin>>a>>b>>c>>d; if(c==0 && d==0) solve1(a,b); else if(a==0 && b==0) solve2(c,d); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...