結果
| 問題 |
No.2843 Birthday Present Struggle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-24 01:06:53 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 682 bytes |
| コンパイル時間 | 3,488 ms |
| コンパイル使用メモリ | 276,888 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-08-24 01:06:59 |
| 合計ジャッジ時間 | 5,582 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 34 |
ソースコード
#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
int N,x[3],y[3];
int dh[3]={-1,0,1},dw[3]={-1,0,1};
bool ichi(int h,int w){
if((h==x[0]&&w==y[0])||(h==x[1]&&w==y[1]))
return true;
else return false;
}
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
cout<<fixed<<setprecision(15);
cin>>N;
vector<pair<int,int>> ans;
for(int i=0;i<3;i++)cin>>x[i]>>y[i];
for(int i=0;i<3;i++)for(int j=0;j<3;j++){
if(dh[i]==0&&dw[j]==0)continue;
if(!ichi(x[2]+dh[i],y[2]+dw[j]))
ans.push_back(make_pair(x[2]+dh[i],y[2]+dw[j]));
}
cout<<ans.size()<<endl;
for(const auto& elm:ans)cout<<elm.first<<" "<<elm.second<<endl;
}