Submission #568473

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5684732022-05-25 14:26:13mircea_007T-Covering (eJOI19_covering)C++17
100 / 100
48 ms21028 KiB
// This program was written on 19.05.2022
// for problem covering
// by Mircea Rebengiuc
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>// exit()
#include <vector>
#define MAXSIZE 1000000
#define INF 2000000000
static inline int max( int a, int b ){ return a > b ? a : b; }
static inline int min( int a, int b ){ return a < b ? a : b; }
int cost[MAXSIZE];
char is_special[MAXSIZE];
int comp[MAXSIZE];
int n, m;
int current_comp;
char delta[MAXSIZE];
int mincost[MAXSIZE];
int sum[MAXSIZE];
int dl[4] = { -1, 0, 1, 0 };
int dc[4] = { 0, 1, 0, -1 };
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

covering.cpp: In function 'void dfs(int, int)':
covering.cpp:39:16: warning: array subscript has type 'char' [-Wchar-subscripts]
   39 |     if( l + dl[d] >= 0 && l + dl[d] < n && c + dc[d] >= 0 && c + dc[d] < m ){
      |                ^
covering.cpp:39:34: warning: array subscript has type 'char' [-Wchar-subscripts]
   39 |     if( l + dl[d] >= 0 && l + dl[d] < n && c + dc[d] >= 0 && c + dc[d] < m ){
      |                                  ^
covering.cpp:39:51: warning: array subscript has type 'char' [-Wchar-subscripts]
   39 |     if( l + dl[d] >= 0 && l + dl[d] < n && c + dc[d] >= 0 && c + dc[d] < m ){
      |                                                   ^
covering.cpp:39:69: warning: array subscript has type 'char' [-Wchar-subscripts]
   39 |     if( l + dl[d] >= 0 && l + dl[d] < n && c + dc[d] >= 0 && c + dc[d] < m ){
      |                                                                     ^
covering.cpp:40:23: warning: array subscript has type 'char' [-Wchar-subscripts]
   40 |       newid = (l + dl[d]) * m + c + dc[d];
      |                       ^
covering.cpp:40:40: warning: array subscript has type 'char' [-Wchar-subscripts]
   40 |       newid = (l + dl[d]) * m + c + dc[d];
      |                                        ^
covering.cpp:43:21: warning: array subscript has type 'char' [-Wchar-subscripts]
   43 |         dfs( l + dl[d], c + dc[d] );
      |                     ^
covering.cpp:43:32: warning: array subscript has type 'char' [-Wchar-subscripts]
   43 |         dfs( l + dl[d], c + dc[d] );
      |                                ^
#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...