QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#563907#9226. Game of GeniusesWRuperDCompile Error//C++20823b2024-09-14 17:07:132024-09-14 17:07:13

Judging History

你现在查看的是最新测评结果

  • [2024-09-14 17:07:13]
  • 评测
  • [2024-09-14 17:07:13]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const int mininf = 1e9 + 7;
#define int long long
#define pb emplace_back
inline int read(){int x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}return x*f;}
inline void write(int x){if(x<0){x=~(x-1);putchar('-');}if(x>9)write(x/10);putchar(x%10+'0');}
#define put() putchar(' ')
#define endl puts("")
const int MAX = 55;

int a[MAX][MAX];

void solve(){
	int n = read();
	int ans = 0;
	for(int i = 1; i <= n; i++){
		int cnt = = inf;
		for(int j = 1; j <= n; j++){
			a[i][j] = read();
			cnt = min(cnt, a[i][j]);
		}
		ans = max(ans, cnt);
	}
	write(cnt), endl;
}

signed main(){
	int t = 1;
	while(t--)	solve();
	return 0;
}

詳細信息

answer.code: In function ‘void solve()’:
answer.code:19:27: error: expected primary-expression before ‘=’ token
   19 |                 int cnt = = inf;
      |                           ^
answer.code:26:15: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
   26 |         write(cnt), endl;
      |               ^~~
      |               int