#403
Concert
Gigel este un cântăreț începător. El știe deja să cânte n
piese, și pentru fiecare piesă se cunoaște durata, exprimată în minute și secunde. Gigel va participa la o emisiune de televiziune, unde va putea cânta timp de T
secunde. El vrea să cânte cât mai multe piese, pentru a-și demonstra talentul deosebit.
Ajutați-l să aleagă piesele pentru emisiune, și vă va răsplăti cu un autograf.
Problema | Concert | Operații I/O |
![]() concert.in /concert.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #9240972 | Utilizator | |
Fișier | concert.cpp | Dimensiune | 825 B |
Data încărcării | 19 Aprilie 2018, 09:38 | Scor / rezultat | Eroare de compilare |
concert.cpp:3:1: error: stray '\302' in program using namespace std; ^ concert.cpp:3:1: error: stray '\240' in program concert.cpp:3:1: error: stray '\302' in program concert.cpp:3:1: error: stray '\240' in program concert.cpp:4:1: error: stray '\302' in program ifstream f("concert.in"); ^ concert.cpp:4:1: error: stray '\240' in program concert.cpp:5:1: error: stray '\302' in program ofstream g("concert.out"); ^ concert.cpp:5:1: error: stray '\240' in program concert.cpp:6:1: error: stray '\302' in program int n,T,nr,s[101]; ^ concert.cpp:6:1: error: stray '\240' in program concert.cpp:7:1: error: stray '\302' in program struct art {int t,ord;} x[101]; ^ concert.cpp:7:1: error: stray '\240' in program concert.cpp:7:1: error: stray '\302' in program concert.cpp:7:1: error: stray '\240' in program concert.cpp:7:1: error: stray '\302' in program concert.cpp:7:1: error: stray '\240' in program concert.cpp:7:1: error: stray '\302' in program concert.cpp:7:1: error: stray '\240' in program concert.cpp:8:1: error: stray '\302' in program int cmp(art A, art B) {return A.t<=B.t;} ^ concert.cpp:8:1: error: stray '\240' in program concert.cpp:8:1: error: stray '\302' in program concert.cpp:8:1: error: stray '\240' in program concert.cpp:8:1: error: stray '\302' in program concert.cpp:8:1: error: stray '\240' in program concert.cpp:8:1: error: stray '\302' in program concert.cpp:8:1: error: stray '\240' in program concert.cpp:8:1: error: stray '\302' in program concert.cpp:8:1: error: stray '\240' in program concert.cpp:8:1: error: stray '\302' in program concert.cpp:8:1: error: stray '\240' in program concert.cpp:9:1: error: stray '\302' in program int main() ^ concert.cpp:9:1: error: stray '\240' in program concert.cpp:10:1: error: stray '\302' in program { f>>n>>T; ^ concert.cpp:10:1: error: stray '\240' in program concert.cpp:10:1: error: stray '\302' in program concert.cpp:10:1: error: stray '\240' in program concert.cpp:10:1: error: stray '\302' in program concert.cpp:10:1: error: stray '\240' in program concert.cpp:11:1: error: stray '\302' in program int i; ^ concert.cpp:11:1: error: stray '\240' in program concert.cpp:11:1: error: stray '\302' in program concert.cpp:11:1: error: stray '\240' in program concert.cpp:11:1: error: stray '\302' in program concert.cpp:11:1: error: stray '\240' in program concert.cpp:11:1: error: stray '\302' in program concert.cpp:11:1: error: stray '\240' in program concert.cpp:11:1: error: stray '\302' in program concert.cpp:11:1: error: stray '\240' in program concert.cpp:12:1: error: stray '\302' in program for(i=1;i<=n;i++) ^ concert.cpp:12:1: error: stray '\240' in program concert.cpp:12:1: error: stray '\302' in program concert.cpp:12:1: error: stray '\240' in program concert.cpp:12:1: error: stray '\302' in program concert.cpp:12:1: error: stray '\240' in program concert.cpp:12:1: error: stray '\302' in program concert.cpp:12:1: error: stray '\240' in program concert.cpp:13:1: error: stray '\302' in program { char v[7]; ^ concert.cpp:13:1: error: stray '\240' in program concert.cpp:13:1: error: stray '\302' in program concert.cpp:13:1: error: stray '\240' in program concert.cpp:13:1: error: stray '\302' in program concert.cpp:13:1: error: stray '\240' in program concert.cpp:13:1: error: stray '\302' in program concert.cpp:13:1: error: stray '\240' in program concert.cpp:13:1: error: stray '\302' in program concert.cpp:13:1: error: stray '\240' in program concert.cpp:13:1: error: stray '\302' in program concert.cpp:13:1: error: stray '\240' in program concert.cpp:13:1: error: stray '\302' in program concert.cpp:13:1: error: stray '\240' in program concert.cpp:13:1: error: stray '\302' in program concert.cpp:13:1: error: stray '\240' in program concert.cpp:14:1: error: stray '\302' in program f>>v; ^ concert.cpp:14:1: error: stray '\240' in program concert.cpp:14:1: error: stray '\302' in program concert.cpp:14:1: error: stray '\240' in program concert.cpp:14:1: error: stray '\302' in program concert.cpp:14:1: error: stray '\240' in program concert.cpp:14:1: error: stray '\302' in program concert.cpp:14:1: error: stray '\240' in program concert.cpp:14:1: error: stray '\302' in program concert.cpp:14:1: error: stray '\240' in program concert.cpp:14:1: error: stray '\302' in program concert.cpp:14:1: error: stray '\240' in program concert.cpp:14:1: error: stray '\302' in program concert.cpp:14:1: error: stray '\240' in program concert.cpp:14:1: error: stray '\302' in program concert.cpp:14:1: error: stray '\240' in program concert.cpp:15:1: error: stray '\302' in program int j=0,a=0,b=0; ^ concert.cpp:15:1: error: stray '\240' in program concert.cpp:15:1: error: stray '\302' in program concert.cpp:15:1: error: stray '\240' in program concert.cpp:15:1: error: stray '\302' in program concert.cpp:15:1: error: stray '\240' in program concert.cpp:15:1: error: stray '\302' in program concert.cpp:15:1: error: stray '\240' in program concert.cpp:15:1: error: stray '\302' in program concert.cpp:15:1: error: stray '\240' in program concert.cpp:15:1: error: stray '\302' in program concert.cpp:15:1: error: stray '\240' in program concert.cpp:15:1: error: stray '\302' in program concert.cpp:15:1: error: stray '\240' in program concert.cpp:15:1: error: stray '\302' in program concert.cpp:15:1: error: stray '\240' in program concert.cpp:15:1: error: stray '\302' in program concert.cpp:15:1: error: stray '\240' in program concert.cpp:16:1: error: stray '\302' in program while(v[j]!=':') a=a*10+v[j++]-'0'; ^ concert.cpp:16:1: error: stray '\240' in program concert.cpp:16:1: error: stray '\302' in program concert.cpp:16:1: error: stray '\240' in program concert.cpp:16:1: error: stray '\302' in program concert.cpp:16:1: error: stray '\240' in program concert.cpp:16:1: error: stray '\302' in program concert.cpp:16:1: error: stray '\240' in program concert.cpp:16:1: error: stray '\302' in program concert.cpp:16:1: error: stray '\240' in program concert.cpp:16:1: error: stray '\302' in program concert.cpp:16:1: error: stray '\240' in program concert.cpp:16:1: error: stray '\302' in program concert.cpp:16:1: error: stray '\240' in program concert.cpp:16:1: error: stray '\302' in program concert.cpp:16:1: error: stray '\240' in program concert.cpp:16:1: error: stray '\302' in program concert.cpp:16:1: error: stray '\240' in program concert.cpp:17:1: error: stray '\302' in program a*=60; j++; ^ concert.cpp:17:1: error: stray '\240' in program concert.cpp:17:1: error: stray '\302' in program concert.cpp:17:1: error: stray '\240' in program concert.cpp:17:1: error: stray '\302' in program concert.cpp:17:1: error: stray '\240' in program concert.cpp:17:1: error: stray '\302' in program concert.cpp:17:1: error: stray '\240' in program concert.cpp:17:1: error: stray '\302' in program concert.cpp:17:1: error: stray '\240' in program concert.cpp:17:1: error: stray '\302' in program concert.cpp:17:1: error: stray '\240' in program concert.cpp:17:1: error: stray '\302' in program concert.cpp:17:1: error: stray '\240' in program concert.cpp:17:1: error: stray '\302' in program concert.cpp:17:1: error: stray '\240' in program concert.cpp:17:1: error: stray '\302' in program concert.cpp:17:1: error: stray '\240' in program concert.cpp:18:1: error: stray '\302' in program while(v[j]!='\0') b=b*10+v[j++]-'0'; ^ concert.cpp:18:1: error: stray '\240' in program concert.cpp:18:1: error: stray '\302' in program concert.cpp:18:1: error: stray '\240' in program concert.cpp:18:1: error: stray '\302' in program concert.cpp:18:1: error: stray '\240' in program concert.cpp:18:1: error: stray '\302' in program concert.cpp:18:1: error: stray '\240' in program concert.cpp:18:1: error: stray '\302' in program concert.cpp:18:1: error: stray '\240' in program concert.cpp:18:1: error: stray '\302' in program concert.cpp:18:1: error: stray '\240' in program concert.cpp:18:1: error: stray '\302' in program concert.cpp:18:1: error: stray '\240' in program concert.cpp:18:1: error: stray '\302' in program concert.cpp:18:1: error: stray '\240' in program concert.cpp:18:1: error: stray '\302' in program concert.cpp:18:1: error: stray '\240' in program concert.cpp:19:1: error: stray '\302' in program a+=b; ^ concert.cpp:19:1: error: stray '\240' in program concert.cpp:19:1: error: stray '\302' in program concert.cpp:19:1: error: stray '\240' in program concert.cpp:19:1: error: stray '\302' in program concert.cpp:19:1: error: stray '\240' in program concert.cpp:19:1: error: stray '\302' in program concert.cpp:19:1: error: stray '\240' in program concert.cpp:19:1: error: stray '\302' in program concert.cpp:19:1: error: stray '\240' in program concert.cpp:19:1: error: stray '\302' in program concert.cpp:19:1: error: stray '\240' in program concert.cpp:19:1: error: stray '\302' in program concert.cpp:19:1: error: stray '\240' in program concert.cpp:19:1: error: stray '\302' in program concert.cpp:19:1: error: stray '\240' in program concert.cpp:20:1: error: stray '\302' in program x[i].t=a; x[i].ord=i; ^ concert.cpp:20:1: error: stray '\240' in program concert.cpp:20:1: error: stray '\302' in program concert.cpp:20:1: error: stray '\240' in program concert.cpp:20:1: error: stray '\302' in program concert.cpp:20:1: error: stray '\240' in program concert.cpp:20:1: error: stray '\302' in program concert.cpp:20:1: error: stray '\240' in program concert.cpp:20:1: error: stray '\302' in program concert.cpp:20:1: error: stray '\240' in program concert.cpp:20:1: error: stray '\302' in program concert.cpp:20:1: error: stray '\240' in program concert.cpp:20:1: error: stray '\302' in program concert.cpp:20:1: error: stray '\240' in program concert.cpp:20:1: error: stray '\302' in program concert.cpp:20:1: error: stray '\240' in program concert.cpp:20:1: error: stray '\302' in program concert.cpp:20:1: error: stray '\240' in program concert.cpp:21:1: error: stray '\302' in program } ^ concert.cpp:21:1: error: stray '\240' in program concert.cpp:21:1: error: stray '\302' in program concert.cpp:21:1: error: stray '\240' in program concert.cpp:21:1: error: stray '\302' in program concert.cpp:21:1: error: stray '\240' in program concert.cpp:21:1: error: stray '\302' in program concert.cpp:21:1: error: stray '\240' in program concert.cpp:22:1: error: stray '\302' in program sort(x+1,x+n+1,cmp); ^ concert.cpp:22:1: error: stray '\240' in program concert.cpp:22:1: error: stray '\302' in program concert.cpp:22:1: error: stray '\240' in program concert.cpp:22:1: error: stray '\302' in program concert.cpp:22:1: error: stray '\240' in program concert.cpp:22:1: error: stray '\302' in program concert.cpp:22:1: error: stray '\240' in program concert.cpp:23:1: error: stray '\302' in program i=1; ^ concert.cpp:23:1: error: stray '\240' in program concert.cpp:23:1: error: stray '\302' in program concert.cpp:23:1: error: stray '\240' in program concert.cpp:23:1: error: stray '\302' in program concert.cpp:23:1: error: stray '\240' in program concert.cpp:23:1: error: stray '\302' in program concert.cpp:23:1: error: stray '\240' in program concert.cpp:24:1: error: stray '\302' in program while(i<=n and x[i].t<=T) {s[++nr]=x[i].ord; T-=x[i].t; ++i;} ^ concert.cpp:24:1: error: stray '\240' in program concert.cpp:24:1: error: stray '\302' in program concert.cpp:24:1: error: stray '\240' in program concert.cpp:24:1: error: stray '\302' in program concert.cpp:24:1: error: stray '\240' in program concert.cpp:24:1: error: stray '\302' in program concert.cpp:24:1: error: stray '\240' in program concert.cpp:24:1: error: stray '\302' in program concert.cpp:24:1: error: stray '\240' in program concert.cpp:24:1: error: stray '\302' in program concert.cpp:24:1: error: stray '\240' in program concert.cpp:24:1: error: stray '\302' in program concert.cpp:24:1: error: stray '\240' in program concert.cpp:24:1: error: stray '\302' in program concert.cpp:24:1: error: stray '\240' in program concert.cpp:24:1: error: stray '\302' in program concert.cpp:24:1: error: stray '\240' in program concert.cpp:25:1: error: stray '\302' in program g<<nr<<'\n'; ^ concert.cpp:25:1: error: stray '\240' in program concert.cpp:25:1: error: stray '\302' in program concert.cpp:25:1: error: stray '\240' in program concert.cpp:25:1: error: stray '\302' in program concert.cpp:25:1: error: stray '\240' in program concert.cpp:25:1: error: stray '\302' in program concert.cpp:25:1: error: stray '\240' in program concert.cpp:26:1: error: stray '\302' in program for(i=1;i<=nr;i++) g<<s[i]<<' '; ^ concert.cpp:26:1: error: stray '\240' in program concert.cpp:26:1: error: stray '\302' in program concert.cpp:26:1: error: stray '\240' in program concert.cpp:26:1: error: stray '\302' in program concert.cpp:26:1: error: stray '\240' in program concert.cpp:26:1: error: stray '\302' in program concert.cpp:26:1: error: stray '\240' in program concert.cpp:26:1: error: stray '\302' in program concert.cpp:26:1: error: stray '\240' in program concert.cpp:26:38: warning: multi-character character constant [-Wmultichar] for(i=1;i<=nr;i++) g<<s[i]<<' '; ^ concert.cpp:27:1: error: stray '\302' in program g.close(); return 0; ^ concert.cpp:27:1: error: stray '\240' in program concert.cpp:27:1: error: stray '\302' in program concert.cpp:27:1: error: stray '\240' in program concert.cpp:27:1: error: stray '\302' in program concert.cpp:27:1: error: stray '\240' in program concert.cpp:27:1: error: stray '\302' in program concert.cpp:27:1: error: stray '\240' in program concert.cpp:27:1: error: stray '\302' in program concert.cpp:27:1: error: stray '\240' in program concert.cpp:27:1: error: stray '\302' in program concert.cpp:27:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Concert face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.