Pagini recente » Borderou de evaluare (job #1277524) | Borderou de evaluare (job #1664105) | Borderou de evaluare (job #492835) | Borderou de evaluare (job #1765084) | Borderou de evaluare (job #2270531)
Borderou de evaluare (job #2270531)
Raport evaluator
Compilare:
main.cpp: In function 'int main()':
main.cpp:7:93: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
priority_queue <int , vector<int>, greater <int> >p;int main(){freopen("proc2.in","r",stdin);freopen("proc2.out","w",stdout);int n,m,ts,tf,d;scanf("%d%d",&n,&m);for(int i=1;i<=n;i++)p.push(i);for(int i=1;i<=m;i++){scanf("%d%d",&ts,&d);tf=ts+d;while(!q.empty() && q.top().first<=ts){p.push(q.top().second);q.pop();}printf("%d\n",p.top());q.push(make_pair(tf,p.top()));p.pop();}
^
main.cpp:7:125: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
priority_queue <int , vector<int>, greater <int> >p;int main(){freopen("proc2.in","r",stdin);freopen("proc2.out","w",stdout);int n,m,ts,tf,d;scanf("%d%d",&n,&m);for(int i=1;i<=n;i++)p.push(i);for(int i=1;i<=m;i++){scanf("%d%d",&ts,&d);tf=ts+d;while(!q.empty() && q.top().first<=ts){p.push(q.top().second);q.pop();}printf("%d\n",p.top());q.push(make_pair(tf,p.top()));p.pop();}
^
main.cpp:7:161: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
priority_queue <int , vector<int>, greater <int> >p;int main(){freopen("proc2.in","r",stdin);freopen("proc2.out","w",stdout);int n,m,ts,tf,d;scanf("%d%d",&n,&m);for(int i=1;i<=n;i++)p.push(i);for(int i=1;i<=m;i++){scanf("%d%d",&ts,&d);tf=ts+d;while(!q.empty() && q.top().first<=ts){p.push(q.top().second);q.pop();}printf("%d\n",p.top());q.push(make_pair(tf,p.top()));p.pop();}
^
main.cpp:7:235: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
priority_queue <int , vector<int>, greater <int> >p;int main(){freopen("proc2.in","r",stdin);freopen("proc2.out","w",stdout);int n,m,ts,tf,d;scanf("%d%d",&n,&m);for(int i=1;i<=n;i++)p.push(i);for(int i=1;i<=m;i++){scanf("%d%d",&ts,&d);tf=ts+d;while(!q.empty() && q.top().first<=ts){p.push(q.top().second);q.pop();}printf("%d\n",p.top());q.push(make_pair(tf,p.top()));p.pop();}
^
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 5ms | 782kb | OK | 10 |
2 | 5ms | 782kb | OK | 10 |
3 | 4ms | 524kb | OK | 10 |
4 | 43ms | 655kb | OK | 10 |
5 | 58ms | 913kb | OK | 10 |
6 | 74ms | 1302kb | OK | 10 |
7 | 86ms | 1302kb | OK | 10 |
8 | 105ms | 1822kb | OK | 10 |
9 | 122ms | 1695kb | OK | 10 |
10 | 141ms | 2215kb | OK | 10 |
Punctaj total | 100 |