QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#521639 | #7042. So Easy | Garfield | TL | 0ms | 0kb | C++23 | 931b | 2024-08-16 13:31:38 | 2024-08-16 13:31:38 |
answer
#include <bits/stdc++.h>
using namespace std;
#define gyx ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define endl "\n"
#define int long long
const int inf = 0x3f3f3f3f;
const int INF = 0x3f3f3f3f3f3f3f3f;
const int N = 1e3 + 50;
const int ovo = 0;
int a[N][N];
int randint(int l, int r) {
// random_device rd;
mt19937 gen(time(NULL));
if (l > r)
swap(l, r);
uniform_int_distribution<int> dis(l, r);
return dis(gen);
}
signed main() {
gyx;
int n;
cin >> n;
int x, y;
for (int i = 1; i <= n;i++){
for (int j = 1; j <= n; j++){
cin >> a[i][j];
if (a[i][j] == -1)
x = i, y = j;
}
}
int x0 = randint(1, n), y0 = randint(1, n);
while(x0 == x || y0 == y){
x0 = randint(1, n), y0 = randint(1, n);
}
cout << a[x0][y] + a[x][y0] - a[x0][y0];
return ovo;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Time Limit Exceeded
input:
3 1 2 1 0 -1 0 0 1 0