Borderou de evaluare (job #1984347)
Utilizator | Data | 24 mai 2017 16:25:59 | |
---|---|---|---|
Problema | Cautare binara | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘long long int bina(long long int)’:
user.cpp:27:14: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
mid = low + high >> 1;
^
user.cpp:36:12: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
mid = low + high >> 1;
^
user.cpp:38:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
printf("%d\n",mid);
^
user.cpp:40:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
printf("%d\n",mid-1);
^
user.cpp: In function ‘long long int binar(long long int)’:
user.cpp:52:13: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
mid = low + high >> 1;
^
user.cpp:57:12: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
mid = low + high >> 1;
^
user.cpp:60:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
printf("%d\n",mid);
^
user.cpp: In function ‘long long int binar2(long long int)’:
user.cpp:71:13: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
mid = low + high >> 1;
^
user.cpp:76:12: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
mid = low + high >> 1;
^
user.cpp:79:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
printf("%d\n",mid);
^
user.cpp: In function ‘int32_t main()’:
user.cpp:90:5: error: request for member ‘push_back’ in ‘ar’, which is of non-class type ‘long long int [100001]’
ar.push_back(-1);
^
user.cpp:93:7: warning: unused variable ‘z’ [-Wunused-variable]
int z;
^
user.cpp:87:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("cautbin.in","r",stdin);
^
user.cpp:88:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("cautbin.out","w",stdout);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !