Pagini recente » Borderou de evaluare (job #2649391) | Borderou de evaluare (job #2401436) | Borderou de evaluare (job #2800796) | Borderou de evaluare (job #1755459) | Borderou de evaluare (job #2498921)
Borderou de evaluare (job #2498921)
Raport evaluator
Compilare:
main.cpp: In function 'int main()':
main.cpp:2:218: warning: operation on 'j' may be undefined [-Wsequence-point]
using namespace std;ifstream fin("stramosi.in");ofstream fout("stramosi.out");int d[19][250004];int n,m,i,a,b,j;int main(){fin>>n>>m;for(i=1;i<=n;) fin>>d[0][i++];for(i=0;i<18;i++) for(j=1;j<=n;) d[i+1][j]=d[i][d[i][j++]];for(;m--;){fin>>a>>b;j=0;while(b) b&(1<<j)?a=d[j][a],b-=(1<<j):0,j++;fout<<a<<"\n";}}
~^~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 3ms | 262kb | OK! | 10 |
2 | 3ms | 262kb | OK! | 10 |
3 | 7ms | 262kb | OK! | 10 |
4 | 15ms | 1048kb | OK! | 10 |
5 | 21ms | 1048kb | OK! | 10 |
6 | 75ms | 2883kb | OK! | 10 |
7 | 113ms | 5505kb | OK! | 10 |
8 | 195ms | 8257kb | OK! | 10 |
9 | 667ms | 17039kb | OK! | 10 |
10 | 646ms | 20971kb | OK! | 10 |
Punctaj total | 100 |