Submission #1049606

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10496062024-08-09 02:12:47vjudge1T-Covering (eJOI19_covering)C++17
100 / 100
70 ms16588 KiB
#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 2;
vector<vector<int>> a;
vector<int> xet;
vector<vector<bool>> check, dem, red;
int n, m, q, x[N], y[N];
int ans = 0, tmp = 0, tmp1 = 0;
int xx[] = {-1, -2, -1, 0, 1, 2, 1, 0, -1, 0, 1, 0}, yy[] = {-1, 0, 1, 2, 1, 0, -1, -2, 0, 1, 0, -1};
bool in(int u, int v)
{
if(u < 0 || v < 0 || u >= n || v >= m)
return false;
return true;
}
void dfs(int u, int v)
{
tmp += a[u][v];
tmp1++;
check[u][v] = true;
for(int i = 8; i < 12; i++)
{
if(in(u + xx[i], v + yy[i]) && !dem[u + xx[i]][v + yy[i]] && !red[u + xx[i]][v + yy[i]])
{
dem[u + xx[i]][v + yy[i]] = true;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

covering.cpp: In function 'int main()':
covering.cpp:79:27: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   79 |             if(xet.size() < 3 * tmp1)
      |                ~~~~~~~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...