Compile Error

/in/foo.cc:4:9: error: 'i' was not declared in this scope
    4 | int n,a[i],dp[100005];string s;
      |         ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:11:14: error: 'a' was not declared in this scope
   11 |         cin>>a[i];
      |              ^
/in/foo.cc:12:11: error: 'a' was not declared in this scope
   12 |     dp[1]=a[1];
      |           ^
/in/foo.cc:15:9: error: 'stirng' was not declared in this scope
   15 |         stirng st=s[i];
      |         ^~~~~~
/in/foo.cc:19:16: error: 'st' was not declared in this scope; did you mean 'std'?
   19 |             if(st.count(s[j]))break;
      |                ^~
      |                std
/in/foo.cc:20:13: error: 'st' was not declared in this scope; did you mean 'std'?
   20 |             st+=s[j];
      |             ^~
      |             std
/in/foo.cc:7:5: warning: label 'std' defined but not used [-Wunused-label]
    7 |     std:ios::sync_with_stdio(false);
      |     ^~~

信息

递交者
类型
递交
题目
P2979 划分字符串
语言
C++
递交时间
2025-10-12 10:01:42
评测时间
2025-10-12 10:01:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes