# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
286947 | 2020-08-31T07:43:19 Z | 최은수(#5772) | None (JOI12_rotate) | C++17 | 1739 ms | 2808 KB |
#include<iostream> #include<vector> #include<algorithm> #define ep emplace #define eb emplace_back #define fi first #define se second #define all(x) (x).begin(),(x).end() using namespace std; typedef long long ll; typedef pair<int,int>pi; typedef pair<ll,ll>pl; const int inf=1e9+7; const ll INF=1e18; char mp[1010][1010]; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n,q; cin>>n>>q; for(int i=0;i++<n;) for(int j=0;j++<n;) cin>>mp[i][j]; for(int qi=0;qi<q;qi++) { register int ik,jk,sk; cin>>ik>>jk>>sk; sk--; for(register int i=0;i*2<=sk;i++) { for(register int j=0;j*2<sk;j++) { char tmp=mp[i+ik][j+jk]; mp[i+ik][j+jk]=mp[j+ik][sk-i+jk]; mp[j+ik][sk-i+jk]=mp[sk-i+ik][sk-j+jk]; mp[sk-i+ik][sk-j+jk]=mp[sk-j+ik][i+jk]; mp[sk-j+ik][i+jk]=tmp; } } } for(int i=0;i++<n;cout<<endl) for(int j=0;j++<n;) cout<<mp[i][j]; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 512 KB | Output is correct |
2 | Correct | 2 ms | 512 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1088 ms | 2712 KB | Output is correct |
2 | Correct | 1 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1160 ms | 2680 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1234 ms | 2680 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1325 ms | 2808 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1416 ms | 2660 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1502 ms | 2664 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1577 ms | 2808 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1654 ms | 2808 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1739 ms | 2656 KB | Output is correct |