# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
286888 |
2020-08-31T06:24:47 Z |
임성재(#5778) |
None (JOI12_rotate) |
C++17 |
|
2000 ms |
1408 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[y + j][x + i]);
}
}
}
for(int i=0; i<n; i++) cout << s[i] << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2085 ms |
1408 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2064 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2050 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2083 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2023 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2073 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2057 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2083 ms |
1408 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2090 ms |
1408 KB |
Time limit exceeded |