結果
問題 |
No.1806 Rotating Golem
|
ユーザー |
![]() |
提出日時 | 2022-08-07 23:29:57 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 755 bytes |
コンパイル時間 | 2,462 ms |
コンパイル使用メモリ | 245,132 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 15:21:32 |
合計ジャッジ時間 | 3,398 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ string S = "NESW"; char a,b; cin>>a>>b; if(a == 'N'){ if(b == 'N') cout<<0<<endl; if(b == 'E') cout<<1<<endl; if(b == 'S') cout<<2<<endl; if(b == 'W') cout<<3<<endl; } if(a == 'E'){ if(b == 'N') cout<<3<<endl; if(b == 'E') cout<<0<<endl; if(b == 'S') cout<<1<<endl; if(b == 'W') cout<<2<<endl; } if(a == 'S'){ if(b == 'N') cout<<2<<endl; if(b == 'E') cout<<3<<endl; if(b == 'S') cout<<0<<endl; if(b == 'W') cout<<1<<endl; } if(a == 'W'){ if(b == 'N') cout<<1<<endl; if(b == 'E') cout<<2<<endl; if(b == 'S') cout<<3<<endl; if(b == 'W') cout<<0<<endl; } }