Submission #2858

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
28582013-08-01 00:38:08naver1간선 파괴 (GA5_destroy)C++98
0 / 100
192 ms1088 KiB
#include <stdio.h>
using namespace std;
int main()
{
int i,j;
int num;
int num1;
int a[701],b[701];
scanf("%d%d",&num1,&num);
for(i=0;i<num;i++) {
scanf("%d%d",&a[i],&b[i]);
}
int num2,a1,b1,k;
int t[1000];
int ans[1000];
int ans1;
scanf("%d",&num2);
for(i=0;i<num2;i++) {
scanf("%d%d",&a1,&b1);
for(j=0;j<num1;j++) {
t[j]=j+1;
}
for(j=0;j<num;j++) {
if(a1-1<=j && j<=b1-1) continue;
if(a[j]>b[j]) {
for(k=0;k<num1;k++) {
if(t[k]==b[j]) t[k]=a[j];
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...