/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:10:25: error: 'strlen' was not declared in this scope
     int n = strlen(a + 1), i = 1, j = 2, ans1 = 0, ans2 = 0, k;
                         ^
/in/foo.cc:11:11: error: 'i' was not declared in this scope
     while(i <= n && j <= n) {
           ^
/in/foo.cc:11:21: error: 'j' was not declared in this scope
     while(i <= n && j <= n) {
                     ^
/in/foo.cc:12:13: error: 'k' was not declared in this scope
         for(k = 0; k <= n && a[i + k] == a[j + k]; k++);
             ^
/in/foo.cc:13:12: error: 'k' was not declared in this scope
         if(k == n) break;
            ^
/in/foo.cc:14:18: error: 'k' was not declared in this scope
         if(a[i + k] > b[i + k]) {
                  ^
/in/foo.cc:23:5: error: 'ans1' was not declared in this scope
     ans1 = min(i, j);
     ^~~~
/in/foo.cc:23:16: error: 'i' was not declared in this scope
     ans1 = min(i, j);
                ^
/in/foo.cc:23:19: error: 'j' was not declared in this scope
     ans1 = min(i, j);
                   ^
/in/foo.cc:26:13: error: 'k' was not declared in this scope
         for(k = 0; k <= n && b[i + k] == b[j + k]; k++);
             ^
/in/foo.cc:27:12: error: 'k' was not declared in this scope
         if(k == n) break;
            ^
/in/foo.cc:28:18: error: 'k' was not declared in this scope
         if(b[i + k] > b[j + k]) {
                  ^
/in/foo.cc:37:5: error: 'ans2' was not declared in this scope
     ans2 = min(i, j);
     ^~~~

信息

递交者
类型
递交
题目
P1382 寻找主人
语言
C++
递交时间
2018-09-09 22:35:44
评测时间
2018-09-09 22:35:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes