#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 | #24510923 | Utilizator | |
Fișier | concert.cpp | Dimensiune | 870 B |
Data încărcării | 12 Octombrie 2020, 08:20 | Scor / rezultat | Eroare de compilare |
concert.cpp:13:1: error: stray '\342' in program bool cmp (pair <int, int> a, pair <int, int> b){ ^ concert.cpp:13:1: error: stray '\200' in program concert.cpp:13:1: error: stray '\213' in program concert.cpp:13:1: error: stray '\342' in program concert.cpp:13:1: error: stray '\200' in program concert.cpp:13:1: error: stray '\213' in program concert.cpp:17:2: error: stray '\342' in program } ^ concert.cpp:17:2: error: stray '\200' in program concert.cpp:17:2: error: stray '\213' in program concert.cpp:17:2: error: stray '\342' in program concert.cpp:17:2: error: stray '\200' in program concert.cpp:17:2: error: stray '\213' in program concert.cpp:21:1: error: stray '\342' in program int main(){ ^ concert.cpp:21:1: error: stray '\200' in program concert.cpp:21:1: error: stray '\213' in program concert.cpp:21:1: error: stray '\342' in program concert.cpp:21:1: error: stray '\200' in program concert.cpp:21:1: error: stray '\213' in program concert.cpp:33:2: error: stray '\342' in program for(int i = 1; i <= n; i++){ ^ concert.cpp:33:2: error: stray '\200' in program concert.cpp:33:2: error: stray '\213' in program concert.cpp:33:2: error: stray '\342' in program concert.cpp:33:2: error: stray '\200' in program concert.cpp:33:2: error: stray '\213' in program concert.cpp:45:2: error: stray '\342' in program } ^ concert.cpp:45:2: error: stray '\200' in program concert.cpp:45:2: error: stray '\213' in program concert.cpp:45:2: error: stray '\342' in program concert.cpp:45:2: error: stray '\200' in program concert.cpp:45:2: error: stray '\213' in program concert.cpp:53:2: error: stray '\342' in program for (int i = 1; i <= n && sec[i].first <= t; i++){ ^ concert.cpp:53:2: error: stray '\200' in program concert.cpp:53:2: error: stray '\213' in program concert.cpp:53:2: error: stray '\342' in program concert.cpp:53:2: error: stray '\200' in program concert.cpp:53:2: error: stray '\213' in program concert.cpp:59:2: error: stray '\342' in program } ^ concert.cpp:59:2: error: stray '\200' in program concert.cpp:59:2: error: stray '\213' in program concert.cpp:59:2: error: stray '\342' in program concert.cpp:59:2: error: stray '\200' in program concert.cpp:59:2: error: stray '\213' in program concert.cpp:73:2: error: stray '\342' in program } ^ concert.cpp:73:2: error: stray '\200' in program concert.cpp:73:2: error: stray '\213' in program concert.cpp:73:2: error: stray '\342' in program concert.cpp:73:2: error: stray '\200' in program concert.cpp:73:2: error: stray '\213' in program concert.cpp: In function 'int main()': concert.cpp:23:36: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen ("concert.in", "r", stdin); ^ concert.cpp:25:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen ("concert.out", "w", stdout); ^ concert.cpp:31:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf ("%d%d ", &n, &t); ^ concert.cpp:39:42: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf ("%d%c%d", &m, &pv, &sec[i].first); ^
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ă.