Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158563 王慕哲 求最大值 C++ Compile Error 0 MS 0 KB 192 2026-08-22 15:11:43

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int a[11],s=0,t; for(int i=1;i<=10;i++){ cin>>a[i]; s=max(a[i],a[i+1]) } cout<<s; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:5: error: expected ';' before '}' token
     }
     ^
Main.cc:4:19: warning: unused variable 't' [-Wunused-variable]
     int a[11],s=0,t;
                   ^