Submission #286848

# Submission time Handle Problem Language Result Execution time Memory
286848 2020-08-31T05:25:24 Z 최은수(#5772) None (JOI12_rotate) C++17
10 / 100
2000 ms 3328 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];
char tmp[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;
        for(int i=0;i<sk;i++)
            for(int j=0;j<sk;j++)
                tmp[sk-1-j+ik][i+jk]=mp[i+ik][j+jk];
        for(int i=0;i<sk;i++)
            for(int j=0;j<sk;j++)
                mp[i+ik][j+jk]=tmp[i+ik][j+jk];
    }
    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 Correct 2 ms 512 KB Output is correct
2 Correct 4 ms 620 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 2084 ms 3328 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2081 ms 3328 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2086 ms 3328 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2088 ms 3320 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2071 ms 3328 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2076 ms 3328 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2082 ms 3328 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2074 ms 3328 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 2056 ms 3328 KB Time limit exceeded