Submission #173291

#TimeUsernameProblemLanguageResultExecution timeMemory
173291mosiashvililukaHedgehog Daniyar and Algorithms (IZhO19_sortbooks)C++14
0 / 100
3053 ms8500 KiB
#include<bits/stdc++.h>
using namespace std;
int a,b,c,d,e,f[1000009],i,j,zx,xc,qq,l,r;
int main(){
    scanf("%d%d\n",&a,&b);
    for(i=1; i<=a; i++) scanf("%d",&f[i]);
    scanf("\n");
    zx=0;
        for(qq=1; qq<=b; qq++){
            scanf("%d%d%d\n",&l,&r,&e);
            if(zx<e) zx=e;
        }
    for(i=1; i<=a; i++){
    	if(f[i]<=zx) break;
	}
	if(i!=a+1){
		for(i=1; ; i++) ;
	}
	cout<<-1;
    return 0;
}

Compilation message (stderr)

sortbooks.cpp: In function 'int main()':
sortbooks.cpp:5:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d\n",&a,&b);
     ~~~~~^~~~~~~~~~~~~~~~
sortbooks.cpp:6:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for(i=1; i<=a; i++) scanf("%d",&f[i]);
                         ~~~~~^~~~~~~~~~~~
sortbooks.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("\n");
     ~~~~~^~~~~~
sortbooks.cpp:10:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
             scanf("%d%d%d\n",&l,&r,&e);
             ~~~~~^~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...