Pagini recente » Borderou de evaluare (job #3151823) | Borderou de evaluare (job #2604318) | Borderou de evaluare (job #2823437) | Borderou de evaluare (job #2259878) | Borderou de evaluare (job #2602655)
Borderou de evaluare (job #2602655)
Raport evaluator
Compilare:
main.cpp: In function 'int go(int)':
main.cpp:3:125: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
int n, m, crt = 1, used[nm], mat[nm][nm], cp[nm], v[256], sol;int go(int nod){if (used[nod] == crt)return 0;used[nod] = crt;for (int i = 1; i <= m; ++i)if (mat[nod][i] && (!cp[i] || go(cp[i]))) {cp[i] = nod;return 1;}return 0;}main(){freopen("paznici.in", "r", stdin);freopen("paznici.out", "w", stdout);scanf("%d%d", &n, &m);for (int i = 1; i <= n; ++i)for (int j = 1; j <= m; ++j) {char ch;scanf(" %c ", &ch);mat[i][j] = ch - '0';}for (int i = 1; i <= n; ++i, ++crt)sol += go(i);for (int i = 1; i <= m; ++i)if (cp[i])v['A' + cp[i] - 1] = 1;int ok = 0;while (!ok) {ok = 1;for (int i = n; i > 0; --i)if (!v['A' + i - 1])for (int j = 1; j <= m; ++j)if (mat[i][j] && !v['a' + j - 1]) {v['A' + cp[j] - 1] = 0;v['a' + j - 1] = 1;ok = 0;}}for (int i = 0; i < 256; ++i)if (v[i])printf("%c", i);printf("\n");}
^~~
main.cpp:4:90: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
main.cpp: At global scope:
main.cpp:4:105: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main.cpp: In function 'int main()':
main.cpp:6:126: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
main.cpp:7:31: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
main.cpp:8:124: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
main.cpp:9:21: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
main.cpp:5:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
main.cpp:5:48: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
main.cpp:5:70: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
main.cpp:6:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
| Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
| 1 | 2ms | 131kb | OK | 4 |
| 2 | 2ms | 131kb | OK | 4 |
| 3 | 2ms | 131kb | OK | 4 |
| 4 | 2ms | 131kb | OK | 4 |
| 5 | 2ms | 131kb | OK | 4 |
| 6 | 2ms | 131kb | OK | 4 |
| 7 | 2ms | 131kb | OK | 4 |
| 8 | 2ms | 131kb | OK | 4 |
| 9 | 2ms | 131kb | OK | 4 |
| 10 | 2ms | 131kb | OK | 4 |
| 11 | 2ms | 131kb | OK | 4 |
| 12 | 2ms | 131kb | OK | 4 |
| 13 | 2ms | 131kb | OK | 4 |
| 14 | 2ms | 131kb | OK | 4 |
| 15 | 2ms | 131kb | OK | 4 |
| 16 | 2ms | 131kb | OK | 4 |
| 17 | 2ms | 131kb | OK | 4 |
| 18 | 2ms | 131kb | OK | 4 |
| 19 | 2ms | 131kb | OK | 4 |
| 20 | 2ms | 131kb | OK | 4 |
| 21 | 2ms | 131kb | OK | 4 |
| 22 | 2ms | 131kb | OK | 4 |
| 23 | 2ms | 131kb | OK | 4 |
| 24 | 2ms | 131kb | OK | 4 |
| 25 | 2ms | 131kb | OK | 4 |
| Punctaj total | 100 |