답안 #681471

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
681471 2023-01-13T06:52:03 Z tegshzaya Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) C++14
8 / 100
3000 ms 4148 KB
#include<bits/stdc++.h>
using namespace std;
int a,b,c[1000010],d,e,f,g=1,h,i,j,k,l,m;
main(){ios::sync_with_stdio(false);
        cin.tie(0);
        cout.tie(0);
    cin>>a>>b;
    for (i=1; i<=a; i++)
    {cin>>c[i];
    }
    for (i=1; i<=b; i++)
    {cin>>d>>e>>f;
        for (j=d; j<=e; j++)
        {
            for (k=j+1; k<=e; k++)
            {if (c[j]>c[k]&&c[j]+c[k]>f){g=0; break;}
            }
        if (g==100) break;
        }
    cout<<g<<" ";
    g=1;
    }
}

Compilation message

sortbooks.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){ios::sync_with_stdio(false);
      | ^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 2 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 12 ms 328 KB Output is correct
7 Correct 14 ms 332 KB Output is correct
8 Correct 23 ms 212 KB Output is correct
9 Correct 10 ms 212 KB Output is correct
10 Correct 24 ms 316 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 2 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 12 ms 328 KB Output is correct
7 Correct 14 ms 332 KB Output is correct
8 Correct 23 ms 212 KB Output is correct
9 Correct 10 ms 212 KB Output is correct
10 Correct 24 ms 316 KB Output is correct
11 Correct 617 ms 320 KB Output is correct
12 Execution timed out 3069 ms 340 KB Time limit exceeded
13 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3048 ms 4148 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3071 ms 724 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 2 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 12 ms 328 KB Output is correct
7 Correct 14 ms 332 KB Output is correct
8 Correct 23 ms 212 KB Output is correct
9 Correct 10 ms 212 KB Output is correct
10 Correct 24 ms 316 KB Output is correct
11 Correct 617 ms 320 KB Output is correct
12 Execution timed out 3069 ms 340 KB Time limit exceeded
13 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 2 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 12 ms 328 KB Output is correct
7 Correct 14 ms 332 KB Output is correct
8 Correct 23 ms 212 KB Output is correct
9 Correct 10 ms 212 KB Output is correct
10 Correct 24 ms 316 KB Output is correct
11 Correct 617 ms 320 KB Output is correct
12 Execution timed out 3069 ms 340 KB Time limit exceeded
13 Halted 0 ms 0 KB -