Submission #467151

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4671512021-08-21 19:36:47mtxasT-Covering (eJOI19_covering)C++14
25 / 100
12 ms6196 KiB
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define fi first
#define se second
#define pll pair<ll, ll>
#define mii map<int, int>
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define all(a) a.begin(), a.end()
#define sz(x) ((int)x.size())
#define turbo() cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false)
#define _fre() freopen("input.txt", "r", stdin)
#define _for(a, b, c) for(int (a) = (b); (a) < (c); (a)++)
#define _foreq(a, b, c) for(int (a) = (b); (a) <= (c); (a)++)
#define _forneq(a, b, c) for(int (a) = (b); (a) >= (c); (a)--)
#define _forn(a, b, c) for(int (a) = (b); (a) > (c); (a)--)
using namespace std;
#define int ll
#define MyMin(a, b) if(a>b) a= b;
/**********************************************************************************
STRUCTS
**********************************************************************************/
/**********************************************************************************
VARIABLES
**********************************************************************************/
int n, m, k, ans = 0;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

covering.cpp: In function 'void prepTable()':
covering.cpp:17:33: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   17 | #define _foreq(a, b, c) for(int (a) = (b); (a) <= (c); (a)++)
      |                                 ^
covering.cpp:64:5: note: in expansion of macro '_foreq'
   64 |     _foreq(i, 1, n) _foreq(j, 1, m) cin>>table[i][j];
      |     ^~~~~~
covering.cpp:17:33: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   17 | #define _foreq(a, b, c) for(int (a) = (b); (a) <= (c); (a)++)
      |                                 ^
covering.cpp:64:21: note: in expansion of macro '_foreq'
   64 |     _foreq(i, 1, n) _foreq(j, 1, m) cin>>table[i][j];
      |                     ^~~~~~
covering.cpp: In function 'void getSpecialCells()':
covering.cpp:16:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   16 | #define _for(a, b, c) for(int (a) = (b); (a) < (c); (a)++)
      |                               ^
covering.cpp:68:5: note: in expansion of macro '_for'
   68 |     _for(i, 0, k) {
      |     ^~~~
covering.cpp:72:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   72 |     for(auto [r, c]: specials)
      |              ^
covering.cpp: In function 'void prepDsu()':
covering.cpp:76:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   76 |     for(auto [r, c]: specials)
      |              ^
covering.cpp:17:33: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   17 | #define _foreq(a, b, c) for(int (a) = (b); (a) <= (c); (a)++)
      |                                 ^
covering.cpp:78:5: note: in expansion of macro '_foreq'
   78 |     _foreq(i, 1, m*n) dydis[i] = 1;
      |     ^~~~~~
covering.cpp: In function 'void uniteComps()':
covering.cpp:100:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  100 |     for(auto [r, c]: specials)
      |              ^
covering.cpp:16:31: warning: unnecessary parentheses in declaration of 'dir' [-Wparentheses]
   16 | #define _for(a, b, c) for(int (a) = (b); (a) < (c); (a)++)
      |                               ^
covering.cpp:101:9: note: in expansion of macro '_for'
  101 |         _for(dir, 0, 12){
      |         ^~~~
covering.cpp: In function 'void colorTable()':
covering.cpp:113:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  113 |     for(auto [r, c]: specials){
      |              ^
covering.cpp:16:31: warning: unnecessary parentheses in declaration of 'dir' [-Wparentheses]
   16 | #define _for(a, b, c) for(int (a) = (b); (a) < (c); (a)++)
      |                               ^
covering.cpp:115:9: note: in expansion of macro '_for'
  115 |         _for(dir, 0, 4){
      |         ^~~~
covering.cpp:17:33: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   17 | #define _foreq(a, b, c) for(int (a) = (b); (a) <= (c); (a)++)
      |                                 ^
covering.cpp:122:6: note: in expansion of macro '_foreq'
  122 |      _foreq(i, 1, n) _foreq(j, 1, m){
      |      ^~~~~~
covering.cpp:17:33: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
   17 | #define _foreq(a, b, c) for(int (a) = (b); (a) <= (c); (a)++)
      |                                 ^
covering.cpp:122:22: note: in expansion of macro '_foreq'
  122 |      _foreq(i, 1, n) _foreq(j, 1, m){
      |                      ^~~~~~
covering.cpp: In function 'void checkComponents()':
covering.cpp:142:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  142 |     for(auto [r, c]: specials){
      |              ^
#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...