# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
286886 |
2020-08-31T06:20:52 Z |
임성재(#5778) |
None (JOI12_rotate) |
C++17 |
|
2000 ms |
2560 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 = x; i < x + k; i++) {
reverse(s[i].begin() + y, s[i].begin() + y + k);
}
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 |
2088 ms |
2432 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2073 ms |
2432 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2070 ms |
2432 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2056 ms |
2432 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2033 ms |
2560 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2070 ms |
2432 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2051 ms |
2432 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2088 ms |
2432 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2040 ms |
2432 KB |
Time limit exceeded |