Submission #23510

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
235102017-05-11 16:16:420xrgbYoung Zebra (KRIII5_YZ)C++14
7 / 7
36 ms5284 KiB
#include <cstdio>
#include <tuple>
#include <deque>
using namespace std;
const int MAXN = 404;
typedef tuple<bool,int,int> ii;
int N, M;
bool D[MAXN][MAXN];
int ans[MAXN][MAXN];
int sz[MAXN * MAXN];
ii visited[MAXN][MAXN];
char imsi[MAXN];
int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};
tuple<int,int> clear_div(int x, int y) {
if (x < 0) {
const int d = (-x) / y;
const int r = (-x) % y;
if (r == 0) return make_tuple(-d, 0);
else return make_tuple(-(d + 1), y - r);
}
return make_tuple(x / y, x % y);
}
int main() {
// 1. input
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

YZ.cpp: In function 'int main()':
YZ.cpp:31:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d", &N, &M);
                        ^
YZ.cpp:33:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s", imsi);
                    ^
#Verdict Execution timeMemoryGrader output
Fetching results...