Pagini recente » Borderou de evaluare (job #1716829) | Borderou de evaluare (job #1004975) | Borderou de evaluare (job #2322654) | Borderou de evaluare (job #2228761) | Borderou de evaluare (job #2395424)
Borderou de evaluare (job #2395424)
Raport evaluator
Compilare:
main.cpp: In function 'int sum(int)':
main.cpp:3:121: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
using namespace std;ifstream f("piata.in");ofstream g("piata.out");int n,x,y,z,t,sol,i,st,cur;int sum (int x){int sol=0;while(x)sol+=x%10,x/=10;return sol;}int main(){f>>n;f>>x>>y>>z>>t;cur=(x>y)?(n-abs(y-x)):y-x;for(i=1;i<=t-y+1;i++)sol+=(t-y-i+2>=z-x+1)?((z-x+1)*(sum(cur=(cur==n)?1:(cur+1)))):((t-y-i+2)*(sum(cur=(cur==n)?1:(cur+1))));cur=(x>y)?(n-abs(y-x)+1):y-x+1;for(i=2;i<=z-x+1;i++)sol+=(z-x-i+2>=t-y+1)?((t-y+1)*(sum(cur=(cur==1)?n:(cur-1)))):((z-x-i+2)*(sum(cur=(cur==1)?n:(cur-1))));g<<sol;return 0;}
^~~~~
main.cpp:4:17: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'while'
main.cpp: In function 'int main()':
main.cpp:5:114: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
main.cpp:6:111: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 2ms | 131kb | OK | 10 |
2 | 2ms | 131kb | OK | 10 |
3 | 2ms | 131kb | OK | 10 |
4 | 2ms | 131kb | OK | 10 |
5 | 2ms | 131kb | OK | 10 |
6 | 2ms | 131kb | OK | 10 |
7 | 3ms | 131kb | OK | 10 |
8 | 3ms | 131kb | OK | 10 |
9 | 3ms | 131kb | OK | 10 |
10 | 2ms | 131kb | OK | 10 |
Punctaj total | 100 |