Borderou de evaluare (job #2278613)
Utilizator | Data | 8 noiembrie 2018 12:26:17 | |
---|---|---|---|
Problema | Trompeta | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:2:174: error: 'gets' was not declared in this scope
using namespace std;char v[1000000],st[1000000];int main(){int n,m,c,i,x=1;freopen("trompeta.in","r",stdin);freopen("trompeta.out","w",stdout);scanf("%d%d\n", &n, &m);gets(v);st[1]=v[0];c=n-m;for (i=1;i<=n;st[++x]=v[i],i++)while (c!=0 && x!=0 && v[i]-'0'>st[x]-'0')c--,x--; printf("%s", st+1);return 0;}
^
main.cpp:2:108: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
using namespace std;char v[1000000],st[1000000];int main(){int n,m,c,i,x=1;freopen("trompeta.in","r",stdin);freopen("trompeta.out","w",stdout);scanf("%d%d\n", &n, &m);gets(v);st[1]=v[0];c=n-m;for (i=1;i<=n;st[++x]=v[i],i++)while (c!=0 && x!=0 && v[i]-'0'>st[x]-'0')c--,x--; printf("%s", st+1);return 0;}
^
main.cpp:2:143: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
using namespace std;char v[1000000],st[1000000];int main(){int n,m,c,i,x=1;freopen("trompeta.in","r",stdin);freopen("trompeta.out","w",stdout);scanf("%d%d\n", &n, &m);gets(v);st[1]=v[0];c=n-m;for (i=1;i<=n;st[++x]=v[i],i++)while (c!=0 && x!=0 && v[i]-'0'>st[x]-'0')c--,x--; printf("%s", st+1);return 0;}
^
main.cpp:2:167: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
using namespace std;char v[1000000],st[1000000];int main(){int n,m,c,i,x=1;freopen("trompeta.in","r",stdin);freopen("trompeta.out","w",stdout);scanf("%d%d\n", &n, &m);gets(v);st[1]=v[0];c=n-m;for (i=1;i<=n;st[++x]=v[i],i++)while (c!=0 && x!=0 && v[i]-'0'>st[x]-'0')c--,x--; printf("%s", st+1);return 0;}
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !