Grafo spalvinimas
- [1] 2026-11-21 12:03 (68)
- [2] 2026-11-21 12:43 (64)
- [3] 2026-11-21 13:52 (76)
- [4] 2026-11-21 14:02 (84)
- [5] 2026-11-21 14:03 (0)
- [6] 2026-11-21 14:05 (0)
- [7] 2026-11-21 14:05 (0)
- [8] 2026-11-21 14:07 (84)
- [9] 2026-11-21 14:10 (100)
Taškai: 0
Compile: FAIL
grafo_spalvinimas.cpp: In function ‘int main()’: grafo_spalvinimas.cpp:2:13: error: ‘__int8’ was not declared in this scope; did you mean ‘u_int’? 2 | #define int __int8 | ^~~~~~ grafo_spalvinimas.cpp:10:5: note: in expansion of macro ‘int’ 10 | int n, m; | ^~~ grafo_spalvinimas.cpp:11:12: error: ‘n’ was not declared in this scope; did you mean ‘yn’? 11 | cin >> n >> m; | ^ | yn grafo_spalvinimas.cpp:11:17: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 11 | cin >> n >> m; | ^ | tm grafo_spalvinimas.cpp:14:25: error: template argument 1 is invalid 14 | vector<pair<int, int>> pairs; | ^~ grafo_spalvinimas.cpp:14:25: error: template argument 2 is invalid grafo_spalvinimas.cpp:16:14: error: expected ‘;’ before ‘i’ 16 | for (int i = 0; i < m; i++) { | ^ grafo_spalvinimas.cpp:16:21: error: ‘i’ was not declared in this scope 16 | for (int i = 0; i < m; i++) { | ^ grafo_spalvinimas.cpp:17:13: error: expected ‘;’ before ‘u’ 17 | int u, v; | ^ grafo_spalvinimas.cpp:18:16: error: ‘u’ was not declared in this scope 18 | cin >> u >> v; | ^ grafo_spalvinimas.cpp:18:21: error: ‘v’ was not declared in this scope 18 | cin >> u >> v; | ^ grafo_spalvinimas.cpp:21:15: error: request for member ‘push_back’ in ‘pairs’, which is of non-class type ‘int’ 21 | pairs.push_back({u-1, v-1}); | ^~~~~~~~~ grafo_spalvinimas.cpp:2:13: error: template argument 2 is invalid 2 | #define int __int8 | ^~~~~~ grafo_spalvinimas.cpp:25:19: note: in expansion of macro ‘int’ 25 | vector<vector<int>> combinations; | ^~~ grafo_spalvinimas.cpp:25:22: error: template argument 1 is invalid 25 | vector<vector<int>> combinations; | ^~ grafo_spalvinimas.cpp:25:22: error: template argument 2 is invalid grafo_spalvinimas.cpp:26:15: error: template argument 2 is invalid 26 | vector<int> curComb(8, 0); | ^ grafo_spalvinimas.cpp:26:29: error: expression list treated as compound expression in initializer [-fpermissive] 26 | vector<int> curComb(8, 0); | ^ grafo_spalvinimas.cpp:27:14: error: expected ‘;’ before ‘j’ 27 | for (int j = 0; j < n; j++) { | ^ grafo_spalvinimas.cpp:27:21: error: ‘j’ was not declared in this scope; did you mean ‘jn’? 27 | for (int j = 0; j < n; j++) { | ^ | jn grafo_spalvinimas.cpp:28:16: error: invalid types ‘int[int]’ for array subscript 28 | curComb[1] = j; | ^ grafo_spalvinimas.cpp:29:18: error: expected ‘;’ before ‘g’ 29 | for (int g = 0; g < n; g++) { | ^ grafo_spalvinimas.cpp:29:25: error: ‘g’ was not declared in this scope 29 | for (int g = 0; g < n; g++) { | ^ grafo_spalvinimas.cpp:30:20: error: invalid types ‘int[int]’ for array subscript 30 | curComb[2] = g; | ^ grafo_spalvinimas.cpp:31:22: error: expected ‘;’ before ‘h’ 31 | for (int h = 0; h < n; h++) { | ^ grafo_spalvinimas.cpp:31:29: error: ‘h’ was not declared in this scope 31 | for (int h = 0; h < n; h++) { | ^ grafo_spalvinimas.cpp:32:24: error: invalid types ‘int[int]’ for array subscript 32 | curComb[3] = h; | ^ grafo_spalvinimas.cpp:33:26: error: expected ‘;’ before ‘a’ 33 | for (int a = 0; a < n; a++) { | ^ grafo_spalvinimas.cpp:33:33: error: ‘a’ was not declared in this scope 33 | for (int a = 0; a < n; a++) { | ^ grafo_spalvinimas.cpp:34:28: error: invalid types ‘int[int]’ for array subscript 34 | curComb[4] = a; | ^ grafo_spalvinimas.cpp:35:30: error: expected ‘;’ before ‘b’ 35 | for (int b = 0; b < n; b++) { | ^ grafo_spalvinimas.cpp:35:37: error: ‘b’ was not declared in this scope 35 | for (int b = 0; b < n; b++) { | ^ grafo_spalvinimas.cpp:36:32: error: invalid types ‘int[int]’ for array subscript 36 | curComb[5] = b; | ^ grafo_spalvinimas.cpp:37:34: error: expected ‘;’ before ‘c’ 37 | for (int c = 0; c < n; c++) { | ^ grafo_spalvinimas.cpp:37:41: error: ‘c’ was not declared in this scope 37 | for (int c = 0; c < n; c++) { | ^ grafo_spalvinimas.cpp:38:36: error: invalid types ‘int[int]’ for array subscript 38 | curComb[6] = c; | ^ grafo_spalvinimas.cpp:39:38: error: expected ‘;’ before ‘d’ 39 | for (int d = 0; d < n; d++) { | ^ grafo_spalvinimas.cpp:39:45: error: ‘d’ was not declared in this scope 39 | for (int d = 0; d < n; d++) { | ^ grafo_spalvinimas.cpp:40:40: error: invalid types ‘int[int]’ for array subscript 40 | curComb[7] = d; | ^ grafo_spalvinimas.cpp:41:46: error: request for member ‘push_back’ in ‘combinations’, which is of non-class type ‘int’ 41 | combinations.push_back(curComb); | ^~~~~~~~~ grafo_spalvinimas.cpp:50:9: error: expected ‘;’ before ‘ans’ 50 | int ans = 8; | ^~~ grafo_spalvinimas.cpp:51:20: error: template argument 2 is invalid 51 | for (vector<int> comb : combinations) { | ^ grafo_spalvinimas.cpp:51:29: error: ‘begin’ was not declared in this scope; did you mean ‘std::begin’? 51 | for (vector<int> comb : combinations) { | ^~~~~~~~~~~~ | std::begin In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95, from grafo_spalvinimas.cpp:1: /usr/include/c++/11/valarray:1228:5: note: ‘std::begin’ declared here 1228 | begin(const valarray<_Tp>& __va) noexcept | ^~~~~ grafo_spalvinimas.cpp:51:29: error: ‘end’ was not declared in this scope; did you mean ‘std::end’? 51 | for (vector<int> comb : combinations) { | ^~~~~~~~~~~~ | std::end In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95, from grafo_spalvinimas.cpp:1: /usr/include/c++/11/valarray:1255:5: note: ‘std::end’ declared here 1255 | end(const valarray<_Tp>& __va) noexcept | ^~~ grafo_spalvinimas.cpp:52:13: error: expected ‘;’ before ‘good’ 52 | int good = true; | ^~~~ grafo_spalvinimas.cpp:53:33: error: ‘begin’ was not declared in this scope; did you mean ‘std::begin’? 53 | for (pair<int, int> p : pairs) { | ^~~~~ | std::begin In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95, from grafo_spalvinimas.cpp:1: /usr/include/c++/11/valarray:1228:5: note: ‘std::begin’ declared here 1228 | begin(const valarray<_Tp>& __va) noexcept | ^~~~~ grafo_spalvinimas.cpp:53:33: error: ‘end’ was not declared in this scope; did you mean ‘std::end’? 53 | for (pair<int, int> p : pairs) { | ^~~~~ | std::end In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95, from grafo_spalvinimas.cpp:1: /usr/include/c++/11/valarray:1255:5: note: ‘std::end’ declared here 1255 | end(const valarray<_Tp>& __va) noexcept | ^~~ grafo_spalvinimas.cpp:54:24: error: request for member ‘first’ in ‘p’, which is of non-class type ‘int’ 54 | if (comb[p.first] == comb[p.second]) { | ^~~~~ grafo_spalvinimas.cpp:54:41: error: request for member ‘second’ in ‘p’, which is of non-class type ‘int’ 54 | if (comb[p.first] == comb[p.second]) { | ^~~~~~ grafo_spalvinimas.cpp:55:17: error: ‘good’ was not declared in this scope 55 | good = false; | ^~~~ grafo_spalvinimas.cpp:60:13: error: ‘good’ was not declared in this scope 60 | if (good) { | ^~~~ grafo_spalvinimas.cpp:61:20: error: template argument 2 is invalid 61 | set<int> used; | ^ grafo_spalvinimas.cpp:61:20: error: template argument 3 is invalid grafo_spalvinimas.cpp:62:22: error: expected ‘;’ before ‘i’ 62 | for (int i : comb) used.insert(i); | ^ grafo_spalvinimas.cpp:63:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’? 63 | ans = min(ans, (int)used.size()); | ^~~ | abs grafo_spalvinimas.cpp:63:33: error: expected ‘)’ before ‘used’ 63 | ans = min(ans, (int)used.size()); | ~ ^~~~ | ) grafo_spalvinimas.cpp:64:9: error: expected primary-expression before ‘}’ token 64 | } | ^ grafo_spalvinimas.cpp:63:46: error: expected ‘)’ before ‘}’ token 63 | ans = min(ans, (int)used.size()); | ^ | ) 64 | } | ~ grafo_spalvinimas.cpp:62:17: note: to match this ‘(’ 62 | for (int i : comb) used.insert(i); | ^ grafo_spalvinimas.cpp:64:9: error: expected primary-expression before ‘}’ token 64 | } | ^ grafo_spalvinimas.cpp:67:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’? 67 | cout << ans; | ^~~ | abs
| nr. | result | time | message |
|---|
