# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
286889 |
2020-08-31T06:26:49 Z |
임성재(#5778) |
None (JOI12_rotate) |
C++17 |
|
2000 ms |
1536 KB |
#include<bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(false); cin.tie(0);
#define fi first
#define se second
#define em emplace
#define eb emplace_back
#define mp make_pair
#define all(v) (v).begin(), (v).end()
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll INF = 1e18;
const int inf = 1e9;
int n, q;
string s[1111];
int main() {
fast;
cin >> n >> q;
for(int i=0; i<n; i++) {
cin >> s[i];
}
while(q--) {
int x, y, k;
cin >> x >> y >> k;
x--, y--;
for(int i = 0; i < k; i++) {
for(int j = 0; j < k - 1 - j; j++) {
swap(s[x + i][y + j], s[x + i][y + k - 1 - j]);
}
}
for(int i = 0; i < k; i++) {
for(int j = 0; j < i; j++) {
swap(s[x + i][y + j], s[x + j][y + i]);
}
}
}
for(int i=0; i<n; i++) cout << s[i] << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2045 ms |
1408 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2087 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2091 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2045 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2094 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2059 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2029 ms |
1536 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2099 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2099 ms |
1408 KB |
Time limit exceeded |