Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61732 张江鹏 19买画笔 C++ Compile Error 0 MS 0 KB 248 2023-12-10 16:15:10

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int n; cin>>n; int a[101]={0},tmp; for(int i;i<n;i++){ cin>>tmp; a[tmp]++; } int as; for(int i=0;i<101;i++){ if(a[i]=1){ as=1; } } cout<<as; return 0; } a


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   if(a[i]=1){
            ^
Main.cc: At global scope:
Main.cc:20:1: error: 'a' does not name a type
 a 
 ^