Submission #62282013
Source Code Expand
Copy
#include<bits/stdc++.h>using namespace std;const int N = 1e5+10;int main(){ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);string s;cin>>s;if(s=="N"){cout<<"S"<<endl;}else if(s=="S") cout<<"N"<<endl;else if(s=="SE") cout<<"NW"<<endl;else if(s=="NW") cout<<"SE"<<endl;else if(s=="W") cout<<"E"<<endl;else if(s=="E") cout<<"W"<<endl;else if(s=="SW") cout<<"NE"<<endl;else if(s=="NE") cout<<"SW"<<endl;return 0;
#include<bits/stdc++.h> using namespace std; const int N = 1e5+10; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin>>s; if(s=="N"){ cout<<"S"<<endl; } else if(s=="S") cout<<"N"<<endl; else if(s=="SE") cout<<"NW"<<endl; else if(s=="NW") cout<<"SE"<<endl; else if(s=="W") cout<<"E"<<endl; else if(s=="E") cout<<"W"<<endl; else if(s=="SW") cout<<"NE"<<endl; else if(s=="NE") cout<<"SW"<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Lucky Direction |
User | ruixi0528 |
Language | C++ 23 (gcc 12.2) |
Score | 100 |
Code Size | 477 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3544 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 1 ms | 3396 KB |
00_sample_02.txt | AC | 1 ms | 3344 KB |
01_test_01.txt | AC | 1 ms | 3476 KB |
01_test_02.txt | AC | 1 ms | 3404 KB |
01_test_03.txt | AC | 1 ms | 3536 KB |
01_test_04.txt | AC | 1 ms | 3544 KB |
01_test_05.txt | AC | 1 ms | 3428 KB |
01_test_06.txt | AC | 1 ms | 3472 KB |