Borderou de evaluare (job #3249652)

Utilizator bent_larsenSturzu Antonio-Gabriel bent_larsen Data 17 octombrie 2024 15:00:10
Problema Ghicit Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:5:1: error: 'string' does not name a type 5 | string s; | ^~~~~~ main.cpp: In function 'int calc(const int&, const int&)': main.cpp:16:13: error: 's' was not declared in this scope 16 | int n = s.size(); | ^ main.cpp:18:31: error: 'max' was not declared in this scope; did you mean 'nmax'? 18 | int left = 1, right = n - max(a, b); | ^~~ | nmax main.cpp: In function 'bool comp(const int&, const int&)': main.cpp:36:12: error: 's' was not declared in this scope 36 | return s[a + l - 1] < s[b + l - 1]; | ^ main.cpp: In function 'int main()': main.cpp:40:35: error: 'stdin' was not declared in this scope 40 | freopen("ghicit.in", "r", stdin); | ^~~~~ main.cpp:1:1: note: 'stdin' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'? +++ |+#include <cstdio> 1 | typedef unsigned long long ull; main.cpp:40:9: error: 'freopen' was not declared in this scope 40 | freopen("ghicit.in", "r", stdin); | ^~~~~~~ main.cpp:41:36: error: 'stdout' was not declared in this scope 41 | freopen("ghicit.out", "w", stdout); | ^~~~~~ main.cpp:41:36: note: 'stdout' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'? main.cpp:42:5: error: 'cin' was not declared in this scope 42 | cin >> s; | ^~~ main.cpp:42:12: error: 's' was not declared in this scope 42 | cin >> s; | ^ main.cpp:50:5: error: 'vector' was not declared in this scope 50 | vector<int> v(n); | ^~~~~~ main.cpp:50:12: error: expected primary-expression before 'int' 50 | vector<int> v(n); | ^~~ main.cpp:52:9: error: 'v' was not declared in this scope 52 | v[i] = i; | ^ main.cpp:53:10: error: 'v' was not declared in this scope 53 | sort(v.begin(), v.end(), comp); | ^ main.cpp:53:5: error: 'sort' was not declared in this scope; did you mean 'short'? 53 | sort(v.begin(), v.end(), comp); | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?