結果
問題 |
No.2843 Birthday Present Struggle
|
ユーザー |
|
提出日時 | 2024-08-31 11:47:31 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,636 bytes |
コンパイル時間 | 1,148 ms |
コンパイル使用メモリ | 113,356 KB |
最終ジャッジ日時 | 2025-02-24 03:29:40 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 10 WA * 24 |
ソースコード
#include<iostream> #include<string> #include<queue> #include<vector> #include<cassert> #include<random> #include<set> #include<map> #include<cassert> #include<unordered_map> #include<bitset> #include<numeric> #include<algorithm> using namespace std; typedef long long ll; const int inf=1<<30; const ll INF=1LL<<62; typedef pair<int,ll> P; typedef pair<int,P> PP; const ll MOD=998244353; int main(){ int N; cin>>N; const int M=3; P A,B,C; cin>>A.first>>A.second; cin>>B.first>>B.second; cin>>C.first>>C.second; // vector<P> p(M);//p[0]=A,p[1]=B,p[2]=C // for(int i=0;i<M;i++){ // cin>>p[i].first>>p[i].second; // } for(int i=1;i<=N;i++){ //x=iの軸に沿って壁を作るとする if(A.second<i && B.second<i && i<C.second){ cout<<N<<endl; for(int y=1;y<=N;y++){ cout<<y<<" "<<i<<endl; } return 0; } if(A.second>i && B.second>i && i>C.second){ cout<<N<<endl; for(int y=1;y<=N;y++){ cout<<y<<" "<<i<<endl; } return 0; } } for(int i=1;i<=N;i++){ //y=iの軸に沿って壁を作るとする if(A.first<i && B.first<i && i<C.first){ cout<<N<<endl; for(int x=1;x<=N;x++){ cout<<i<<" "<<x<<endl; } return 0; } if(A.first>i && B.first>i && i>C.first){ cout<<N<<endl; for(int x=1;x<=N;x++){ cout<<i<<" "<<x<<endl; } return 0; } } }