| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 198920 | arnold518 | 복사 붙여넣기 2 (JOI15_copypaste2) | C++14 | 316 ms | 12536 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 2e5;
int K, N;
ll A[MAXN+10], B[MAXN+10], C[MAXN+10], D[MAXN+10];
char S[MAXN+10];
int main()
{
	int i, j;
	scanf("%d%*d%s%d", &K, S, &N);
	for(i=1; i<=N; i++)
	{
		scanf("%lld%lld%lld", &A[i], &B[i], &C[i]);
		B[i]--;
		D[i]=C[i]+B[i]-A[i];
	}
	for(i=0; i<K; i++)
	{
		int pos=i;
		for(j=N; j>=1; j--)
		{
			if(C[j]<=pos && pos<=D[j]) pos=pos-C[j]+A[j];
			else if(D[j]<pos) pos-=D[j]-C[j]+1;
		}
		printf("%c", S[pos]);
	}
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
