#584
Anunt
Într-o clasă sunt n
elevi, numerotați de la 1
la n
, iar unii dintre ei pot cunoaște numerele de telefon ale altor elevi. Dirigintele dorește să-i anunțe pe elevi despre un eveniment deosebit și pentru aceasta vrea să transmită informația unui singur elev din clasă, urmând ca acesta să-și anunțe colegii cărora le cunoaște numărul de telefon, aceștia să-și anunțe colegii cărora le cunosc numărul de telefon etc, astfel încât toți elevii să afle informația respectivă.
Determinați care sunt elevii din clasă care pot fi anunțați inițial astfel încât, toți elevii să fie în cele din urmă informați.
Problema | Anunt | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20682875 | Utilizator | |
Fișier | anunt.cpp | Dimensiune | 952 B |
Data încărcării | 06 Februarie 2020, 23:15 | Scor / rezultat | Eroare de compilare |
anunt.cpp:5:1: error: stray '\302' in program ^ anunt.cpp:5:1: error: stray '\240' in program anunt.cpp:7:1: error: stray '\302' in program using namespace std; ^ anunt.cpp:7:1: error: stray '\240' in program anunt.cpp:7:1: error: stray '\302' in program anunt.cpp:7:1: error: stray '\240' in program anunt.cpp:9:1: error: stray '\302' in program ^ anunt.cpp:9:1: error: stray '\240' in program anunt.cpp:11:1: error: stray '\302' in program bool a[105][105],viz[105]; ^ anunt.cpp:11:1: error: stray '\240' in program anunt.cpp:13:1: error: stray '\302' in program int n; ^ anunt.cpp:13:1: error: stray '\240' in program anunt.cpp:15:1: error: stray '\302' in program ^ anunt.cpp:15:1: error: stray '\240' in program anunt.cpp:17:1: error: stray '\302' in program void citire() ^ anunt.cpp:17:1: error: stray '\240' in program anunt.cpp:21:1: error: stray '\302' in program int m,x,y; ^ anunt.cpp:21:1: error: stray '\240' in program anunt.cpp:21:1: error: stray '\302' in program anunt.cpp:21:1: error: stray '\240' in program anunt.cpp:21:1: error: stray '\302' in program anunt.cpp:21:1: error: stray '\240' in program anunt.cpp:21:1: error: stray '\302' in program anunt.cpp:21:1: error: stray '\240' in program anunt.cpp:23:1: error: stray '\302' in program cin>>n>>m; ^ anunt.cpp:23:1: error: stray '\240' in program anunt.cpp:23:1: error: stray '\302' in program anunt.cpp:23:1: error: stray '\240' in program anunt.cpp:23:1: error: stray '\302' in program anunt.cpp:23:1: error: stray '\240' in program anunt.cpp:25:1: error: stray '\302' in program for (int i=1;i<=m;i++) ^ anunt.cpp:25:1: error: stray '\240' in program anunt.cpp:25:1: error: stray '\302' in program anunt.cpp:25:1: error: stray '\240' in program anunt.cpp:25:1: error: stray '\302' in program anunt.cpp:25:1: error: stray '\240' in program anunt.cpp:25:1: error: stray '\302' in program anunt.cpp:25:1: error: stray '\240' in program anunt.cpp:25:1: error: stray '\302' in program anunt.cpp:25:1: error: stray '\240' in program anunt.cpp:27:1: error: stray '\302' in program { ^ anunt.cpp:27:1: error: stray '\240' in program anunt.cpp:27:1: error: stray '\302' in program anunt.cpp:27:1: error: stray '\240' in program anunt.cpp:27:1: error: stray '\302' in program anunt.cpp:27:1: error: stray '\240' in program anunt.cpp:29:1: error: stray '\302' in program cin>>x>>y; ^ anunt.cpp:29:1: error: stray '\240' in program anunt.cpp:29:1: error: stray '\302' in program anunt.cpp:29:1: error: stray '\240' in program anunt.cpp:29:1: error: stray '\302' in program anunt.cpp:29:1: error: stray '\240' in program anunt.cpp:29:1: error: stray '\302' in program anunt.cpp:29:1: error: stray '\240' in program anunt.cpp:29:1: error: stray '\302' in program anunt.cpp:29:1: error: stray '\240' in program anunt.cpp:31:1: error: stray '\302' in program a[x][y]=1; ^ anunt.cpp:31:1: error: stray '\240' in program anunt.cpp:31:1: error: stray '\302' in program anunt.cpp:31:1: error: stray '\240' in program anunt.cpp:31:1: error: stray '\302' in program anunt.cpp:31:1: error: stray '\240' in program anunt.cpp:31:1: error: stray '\302' in program anunt.cpp:31:1: error: stray '\240' in program anunt.cpp:33:1: error: stray '\302' in program } ^ anunt.cpp:33:1: error: stray '\240' in program anunt.cpp:33:1: error: stray '\302' in program anunt.cpp:33:1: error: stray '\240' in program anunt.cpp:33:1: error: stray '\302' in program anunt.cpp:33:1: error: stray '\240' in program anunt.cpp:37:1: error: stray '\302' in program ^ anunt.cpp:37:1: error: stray '\240' in program anunt.cpp:39:1: error: stray '\302' in program void Fill(int x) ^ anunt.cpp:39:1: error: stray '\240' in program anunt.cpp:39:1: error: stray '\302' in program anunt.cpp:39:1: error: stray '\240' in program anunt.cpp:43:1: error: stray '\302' in program viz[x]=1; ^ anunt.cpp:43:1: error: stray '\240' in program anunt.cpp:43:1: error: stray '\302' in program anunt.cpp:43:1: error: stray '\240' in program anunt.cpp:45:1: error: stray '\302' in program for (int i=1;i<=n;i++) ^ anunt.cpp:45:1: error: stray '\240' in program anunt.cpp:45:1: error: stray '\302' in program anunt.cpp:45:1: error: stray '\240' in program anunt.cpp:45:1: error: stray '\302' in program anunt.cpp:45:1: error: stray '\240' in program anunt.cpp:45:1: error: stray '\302' in program anunt.cpp:45:1: error: stray '\240' in program anunt.cpp:45:1: error: stray '\302' in program anunt.cpp:45:1: error: stray '\240' in program anunt.cpp:47:1: error: stray '\302' in program if (a[x][i] && !viz[i]) ^ anunt.cpp:47:1: error: stray '\240' in program anunt.cpp:47:1: error: stray '\302' in program anunt.cpp:47:1: error: stray '\240' in program anunt.cpp:47:1: error: stray '\302' in program anunt.cpp:47:1: error: stray '\240' in program anunt.cpp:47:1: error: stray '\302' in program anunt.cpp:47:1: error: stray '\240' in program anunt.cpp:47:1: error: stray '\302' in program anunt.cpp:47:1: error: stray '\240' in program anunt.cpp:47:1: error: stray '\302' in program anunt.cpp:47:1: error: stray '\240' in program anunt.cpp:47:1: error: stray '\302' in program anunt.cpp:47:1: error: stray '\240' in program anunt.cpp:47:1: error: stray '\302' in program anunt.cpp:47:1: error: stray '\240' in program anunt.cpp:49:1: error: stray '\302' in program Fill(i); ^ anunt.cpp:49:1: error: stray '\240' in program anunt.cpp:49:1: error: stray '\302' in program anunt.cpp:49:1: error: stray '\240' in program anunt.cpp:49:1: error: stray '\302' in program anunt.cpp:49:1: error: stray '\240' in program anunt.cpp:49:1: error: stray '\302' in program anunt.cpp:49:1: error: stray '\240' in program anunt.cpp:49:1: error: stray '\302' in program anunt.cpp:49:1: error: stray '\240' in program anunt.cpp:49:1: error: stray '\302' in program anunt.cpp:49:1: error: stray '\240' in program anunt.cpp:53:1: error: stray '\302' in program ^ anunt.cpp:53:1: error: stray '\240' in program anunt.cpp:55:1: error: stray '\302' in program bool verif() ^ anunt.cpp:55:1: error: stray '\240' in program anunt.cpp:59:1: error: stray '\302' in program for (int i=1;i<=n;i++) ^ anunt.cpp:59:1: error: stray '\240' in program anunt.cpp:59:1: error: stray '\302' in program anunt.cpp:59:1: error: stray '\240' in program anunt.cpp:59:1: error: stray '\302' in program anunt.cpp:59:1: error: stray '\240' in program anunt.cpp:59:1: error: stray '\302' in program anunt.cpp:59:1: error: stray '\240' in program anunt.cpp:59:1: error: stray '\302' in program anunt.cpp:59:1: error: stray '\240' in program anunt.cpp:61:1: error: stray '\302' in program if (!viz[i]) ^ anunt.cpp:61:1: error: stray '\240' in program anunt.cpp:61:1: error: stray '\302' in program anunt.cpp:61:1: error: stray '\240' in program anunt.cpp:61:1: error: stray '\302' in program anunt.cpp:61:1: error: stray '\240' in program anunt.cpp:61:1: error: stray '\302' in program anunt.cpp:61:1: error: stray '\240' in program anunt.cpp:61:1: error: stray '\302' in program anunt.cpp:61:1: error: stray '\240' in program anunt.cpp:61:1: error: stray '\302' in program anunt.cpp:61:1: error: stray '\240' in program anunt.cpp:63:1: error: stray '\302' in program return false; ^ anunt.cpp:63:1: error: stray '\240' in program anunt.cpp:63:1: error: stray '\302' in program anunt.cpp:63:1: error: stray '\240' in program anunt.cpp:63:1: error: stray '\302' in program anunt.cpp:63:1: error: stray '\240' in program anunt.cpp:63:1: error: stray '\302' in program anunt.cpp:63:1: error: stray '\240' in program anunt.cpp:63:1: error: stray '\302' in program anunt.cpp:63:1: error: stray '\240' in program anunt.cpp:63:1: error: stray '\302' in program anunt.cpp:63:1: error: stray '\240' in program anunt.cpp:63:1: error: stray '\302' in program anunt.cpp:63:1: error: stray '\240' in program anunt.cpp:63:1: error: stray '\302' in program anunt.cpp:63:1: error: stray '\240' in program anunt.cpp:65:1: error: stray '\302' in program return true; ^ anunt.cpp:65:1: error: stray '\240' in program anunt.cpp:65:1: error: stray '\302' in program anunt.cpp:65:1: error: stray '\240' in program anunt.cpp:65:1: error: stray '\302' in program anunt.cpp:65:1: error: stray '\240' in program anunt.cpp:65:1: error: stray '\302' in program anunt.cpp:65:1: error: stray '\240' in program anunt.cpp:69:1: error: stray '\302' in program ^ anunt.cpp:69:1: error: stray '\240' in program anunt.cpp:71:1: error: stray '\302' in program void rezolvare() ^ anunt.cpp:71:1: error: stray '\240' in program anunt.cpp:75:1: error: stray '\302' in program for (int i=1;i<=n;i++) ^ anunt.cpp:75:1: error: stray '\240' in program anunt.cpp:75:1: error: stray '\302' in program anunt.cpp:75:1: error: stray '\240' in program anunt.cpp:75:1: error: stray '\302' in program anunt.cpp:75:1: error: stray '\240' in program anunt.cpp:75:1: error: stray '\302' in program anunt.cpp:75:1: error: stray '\240' in program anunt.cpp:75:1: error: stray '\302' in program anunt.cpp:75:1: error: stray '\240' in program anunt.cpp:77:1: error: stray '\302' in program { ^ anunt.cpp:77:1: error: stray '\240' in program anunt.cpp:77:1: error: stray '\302' in program anunt.cpp:77:1: error: stray '\240' in program anunt.cpp:77:1: error: stray '\302' in program anunt.cpp:77:1: error: stray '\240' in program anunt.cpp:79:1: error: stray '\302' in program Fill(i); ^ anunt.cpp:79:1: error: stray '\240' in program anunt.cpp:79:1: error: stray '\302' in program anunt.cpp:79:1: error: stray '\240' in program anunt.cpp:79:1: error: stray '\302' in program anunt.cpp:79:1: error: stray '\240' in program anunt.cpp:79:1: error: stray '\302' in program anunt.cpp:79:1: error: stray '\240' in program anunt.cpp:81:1: error: stray '\302' in program if (verif()) ^ anunt.cpp:81:1: error: stray '\240' in program anunt.cpp:81:1: error: stray '\302' in program anunt.cpp:81:1: error: stray '\240' in program anunt.cpp:81:1: error: stray '\302' in program anunt.cpp:81:1: error: stray '\240' in program anunt.cpp:81:1: error: stray '\302' in program anunt.cpp:81:1: error: stray '\240' in program anunt.cpp:81:1: error: stray '\302' in program anunt.cpp:81:1: error: stray '\240' in program anunt.cpp:81:1: error: stray '\302' in program anunt.cpp:81:1: error: stray '\240' in program anunt.cpp:83:1: error: stray '\302' in program cout<<i<<' '; ^ anunt.cpp:83:1: error: stray '\240' in program anunt.cpp:83:1: error: stray '\302' in program anunt.cpp:83:1: error: stray '\240' in program anunt.cpp:83:1: error: stray '\302' in program anunt.cpp:83:1: error: stray '\240' in program anunt.cpp:83:1: error: stray '\302' in program anunt.cpp:83:1: error: stray '\240' in program anunt.cpp:83:1: error: stray '\302' in program anunt.cpp:83:1: error: stray '\240' in program anunt.cpp:83:1: error: stray '\302' in program anunt.cpp:83:1: error: stray '\240' in program anunt.cpp:83:1: error: stray '\302' in program anunt.cpp:83:1: error: stray '\240' in program anunt.cpp:85:1: error: stray '\302' in program memset(viz,0,105); ^ anunt.cpp:85:1: error: stray '\240' in program anunt.cpp:85:1: error: stray '\302' in program anunt.cpp:85:1: error: stray '\240' in program anunt.cpp:85:1: error: stray '\302' in program anunt.cpp:85:1: error: stray '\240' in program anunt.cpp:85:1: error: stray '\302' in program anunt.cpp:85:1: error: stray '\240' in program anunt.cpp:85:1: error: stray '\302' in program anunt.cpp:85:1: error: stray '\240' in program anunt.cpp:87:1: error: stray '\302' in program } ^ anunt.cpp:87:1: error: stray '\240' in program anunt.cpp:87:1: error: stray '\302' in program anunt.cpp:87:1: error: stray '\240' in program anunt.cpp:87:1: error: stray '\302' in program anunt.cpp:87:1: error: stray '\240' in program anunt.cpp:91:1: error: stray '\302' in program ^ anunt.cpp:91:1: error: stray '\240' in program anunt.cpp:93:1: error: stray '\302' in program int main() ^ anunt.cpp:93:1: error: stray '\240' in program anunt.cpp:97:1: error: stray '\302' in program citire(); ^ anunt.cpp:97:1: error: stray '\240' in program anunt.cpp:97:1: error: stray '\302' in program anunt.cpp:97:1: error: stray '\240' in program anunt.cpp:99:1: error: stray '\302' in program rezolvare(); ^ anunt.cpp:99:1: error: stray '\240' in program anunt.cpp:99:1: error: stray '\302' in program anunt.cpp:99:1: error: stray '\240' in program anunt.cpp:101:1: error: stray '\302' in program return 0; ^ anunt.cpp:101:1: error: stray '\240' in program anunt.cpp:101:1: error: stray '\302' in program anunt.cpp:101:1: error: stray '\240' in program anunt.cpp:101:1: error: stray '\302' in program anunt.cpp:101:1: error: stray '\240' in program anunt.cpp:101:1: error: stray '\302' in program anunt.cpp:101:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Anunt 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ă.