# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
286921 |
2020-08-31T07:13:52 Z |
최은수(#5772) |
None (JOI12_rotate) |
C++17 |
|
1768 ms |
3352 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++)
{
int ik,jk,sk;
cin>>ik>>jk>>sk;
sk--;
for(int i=0;i*2<=sk;i++)
{
for(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+jk][i+jk];
mp[sk-j+jk][i+jk]=tmp;
}
}
}
for(int i=0;i++<n;cout<<endl)
for(int j=0;j++<n;)
cout<<mp[i][j];
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
512 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1079 ms |
3260 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1167 ms |
3352 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1253 ms |
3276 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1332 ms |
3264 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1419 ms |
3320 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1528 ms |
3272 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1599 ms |
3320 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1682 ms |
3320 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1768 ms |
3272 KB |
Output isn't correct |