Borderou de evaluare (job #696799)

Utilizator avatar Demonul Gavrilescu Cristian Razvan Demonul IP ascuns
Problemă Cezark (clasa a 5-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 18 feb. 2023 11:47:57 Scor 100

Raport evaluator

Compilare: main.cpp: In function 'int main()': main.cpp:2:262: warning: array subscript has type 'char' [-Wchar-subscripts] 2 | using namespace std;ifstream f("cezark.in");ofstream g("cezark.out");int const dim=70004;char T[126],c[dim];int main(){int nr,k,i;f>>k;f.get();for(i='a';i<='z';++i){int x=i+k;if(x>'z') x=x-'z'-1+'a';T[i]=x;}while(f.read(c,dim)){nr=0;while(c[nr]>30){c[nr]=T[c[nr]];++nr;}g<<c;}nr=0;while(c[nr]>30){c[nr]=T[c[nr]];++nr;}c[nr]=0;g<<c;return 0;} | ~~~~^ main.cpp:2:310: warning: array subscript has type 'char' [-Wchar-subscripts] 2 | using namespace std;ifstream f("cezark.in");ofstream g("cezark.out");int const dim=70004;char T[126],c[dim];int main(){int nr,k,i;f>>k;f.get();for(i='a';i<='z';++i){int x=i+k;if(x>'z') x=x-'z'-1+'a';T[i]=x;}while(f.read(c,dim)){nr=0;while(c[nr]>30){c[nr]=T[c[nr]];++nr;}g<<c;}nr=0;while(c[nr]>30){c[nr]=T[c[nr]];++nr;}c[nr]=0;g<<c;return 0;} | ~~~~^
Test Timp execuție Memorie folosită Mesaj Punctaj/test
1 1 ms 114 kb OK 10
2 1 ms 114 kb OK 10
3 1 ms 110 kb OK 10
4 1 ms 114 kb OK 10
5 1 ms 110 kb OK 10
6 1 ms 110 kb OK 10
7 1 ms 233 kb OK 10
8 1 ms 278 kb OK 10
9 14 ms 286 kb OK 10
10 20 ms 208 kb OK 10
Punctaj total 100