Pagini recente » Borderou de evaluare (job #2835177) | Borderou de evaluare (job #2406450) | Borderou de evaluare (job #2464164) | Borderou de evaluare (job #3118903) | Borderou de evaluare (job #2148278)
Borderou de evaluare (job #2148278)
Raport evaluator
Compilare:
user.cpp: In function ‘int main()’:
user.cpp:2:347: warning: statement has no effect [-Wunused-value]
using namespace std;int v[10];ifstream fin("numar3.in");ofstream fout("numar3.out");int main(){int n,i,x=-1,y,ua=10,a,j;char c;fin>>n;for(i=1;i<=n;i++){fin>>c;a=c-'0';if(a>ua){j=9;if(x!=-1)fout<<y;if(x==-1)x=1;for(;x<i-1;x++){while(v[j]==0)j--;fout<<j;v[j]--;}v[ua]--;x=i;y=ua;}v[a]++;ua=a;}v[y]++;j=y+1;while(v[j]==0)j++;fout<<j;v[j]--;j=0;for(x;x<=n;x++) {while(v[j]==0)j++;fout<<j;v[j]--;}return 0;}
^
user.cpp:2:304: warning: ‘y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
using namespace std;int v[10];ifstream fin("numar3.in");ofstream fout("numar3.out");int main(){int n,i,x=-1,y,ua=10,a,j;char c;fin>>n;for(i=1;i<=n;i++){fin>>c;a=c-'0';if(a>ua){j=9;if(x!=-1)fout<<y;if(x==-1)x=1;for(;x<i-1;x++){while(v[j]==0)j--;fout<<j;v[j]--;}v[ua]--;x=i;y=ua;}v[a]++;ua=a;}v[y]++;j=y+1;while(v[j]==0)j++;fout<<j;v[j]--;j=0;for(x;x<=n;x++) {while(v[j]==0)j++;fout<<j;v[j]--;}return 0;}
^
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 0ms | 1560kb | OK | 10 |
2 | 0ms | 1560kb | OK | 10 |
3 | 0ms | 1560kb | OK | 10 |
4 | 16ms | 1568kb | OK | 10 |
5 | 128ms | 1572kb | OK | 10 |
6 | 308ms | 1564kb | OK | 10 |
7 | 680ms | 1568kb | OK | 10 |
8 | 704ms | 1568kb | OK | 10 |
9 | 708ms | 1568kb | OK | 10 |
10 | 740ms | 1564kb | OK | 10 |
Punctaj total | 100 |