QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#177516 | #7119. Longest Trip | triple321# | Compile Error | / | / | C++20 | 3.6kb | 2023-09-13 01:03:29 | 2024-04-28 08:46:32 |
Judging History
你现在查看的是最新测评结果
- [2024-04-28 08:46:32]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-09-13 01:03:30]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-09-13 01:03:29]
- 提交
answer
#include <bits/stdc++.h>
#ifndef CYBER
#include "soccer.h"
#endif
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("Ofast")
using namespace std;
using namespace __gnu_pbds;
#define lg long long
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int biggest_stadium(int n, vector<vector<int>> f)
{
lg pos = 1, ans = 0, sum = 0;
for(int i = 0; i < n; i++)
for(int j = 0; j < n; j++)
ans += !f[i][j], sum += f[i][j];
vector<int> tree[n];
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
if(f[i][j])
{
tree[i].push_back(j);
}
}
}
if(n > 30)
{
for(int i = 0; i < n; i++)
{
lg bef = 0, aft = 0;
for(auto it : tree[i])
{
lg x = it;
while(x >= 0)
{
bef += !f[i][x];
x--;
}
x = it;
while(x < n)
{
aft += !f[i][x];
x++;
}
}
if(bef && aft) pos = 0;
tree[i].clear();
}
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
if(f[i][j])
{
tree[j].push_back(i);
}
}
}
for(int i = 0; i < n; i++)
{
lg bef = 0, aft = 0;
for(auto it : tree[i])
{
lg x = it;
while(x >= 0)
{
bef += !f[x][i];
x--;
}
x = it;
while(x < n)
{
aft += !f[x][i];
x++;
}
}
if(bef && aft) pos = 0;
}
}
else{
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
if(f[i][j]) continue;
for(int k = 0; k < n; k++)
{
for(int z = 0; z < n; z++)
{
if(f[k][z]) continue;
if(i == k && j == z) continue;
if(i == k)
{
for(int g = min(j, z); g <= max(j, z); g++)
{
if(f[i][g]) pos = 0;
if(!pos) break;
}
continue;
}
if(j == z)
{
for(int g = min(i, k); g <= max(i, k); g++)
{
if(f[g][j]) pos = 0;
if(!pos) break;
}
continue;
}
lg l = min(i, k), r = max(i, k);
if(!f[i][z]) continue;
if(!f[k][j]) continue;
pos = 0;
break;
}
if(!pos) break;
}
if(!pos) break;
}
if(!pos) break;
}
}
if(!pos) ans = 1;
if(sum == 1 && !pos)
{
int idI = 0, idJ = 0;
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
if(f[i][j])
{
idI = i, idJ = j;
}
}
}
idI++;
idJ++;
// cout << idI << ' ' << idJ << '\n';
// cout << idI*idJ << ' ' << idJ*(n-idI+1) << ' ' << idI*(n-idJ+1) << ' ' << (n-idJ+1)*(n-idI+1) << '\n';
ans = n*n-min({idI*idJ, idJ*(n-idI+1), idI*(n-idJ+1), (n-idJ+1)*(n-idI+1)});
}
else if(n <= 3 && !pos)
{
for(int i = 0; i < (1ll << (n*n)); i++)
{
vector<array<lg, 2>> a;
for(int j = 0; j < n*n; j++)
{
if((1ll << j)&i)
{
a.push_back({j/n, j%n});
}
}
lg o = 1;
for(auto it : a)
{
for(auto it2 : a)
{
if(it == it2) continue;
if(!f[it[0]][it2[1]]) continue;
if(!f[it2[0]][it[1]]) continue;
if(it[0] == it2[0])
{
for(int j = min(it[1], it2[1]); j <= max(it[1], it2[1]); j++)
{
if(f[it[0]][j]) o = 0;
}
}
if(it[1] == it2[1])
{
for(int j = min(it[0], it2[0]); j <= max(it[0], it2[0]); j++)
{
if(f[j][it[1]]) o = 0;
}
}
o = 0;
break;
}
}
ans = max(ans, (lg)(o*a.size()));
}
}
return ans;
}
Details
answer.code:3:10: fatal error: soccer.h: No such file or directory 3 | #include "soccer.h" | ^~~~~~~~~~ compilation terminated.