답안 #17786

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
17786 2016-01-12T11:14:20 Z Adilkhan 힘 센 거북 (IZhO11_turtle) C++
0 / 100
2 ms 376 KB
#include <bits/stdc++.h>

#define pb push_back
#define endl "\n"
#define mp make_pair 
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define fname ""
#define sz(x) (int)(x.size())

typedef long long ll;

using namespace std;

const ll N = (ll)(5e5) + 322;
const ll INF = (ll)(1e9);
const ll mod = (ll)(1e9) + 7;
const double eps = 1e-9;

int n, m, a[2890002], d[2890002][21], z, k, t, x, y, sum; 

inline int cv(int X, int Y) {
	return (X * (m + 1)) + Y;
}

int main () {
	//freopen(fname".in", "r", stdin);
	//freopen(fname".out", "w", stdout);
	scanf("%d%d%d%d%d", &n, &m, &k, &t, &z);
	for (int i = 1; i <= k; ++i) {
	  scanf("%d%d", &x, &y);
	  //if (cv(x, y) < 0)  assert(0);
		//a[cv(x, y)] = 1;
	}       
	//if (n * m >= 2890000) {
	//	assert(0);
	//}
	/*d[cv(0, 0)][0] = 1;
	for (int i = 0; i <= n; ++i) {
		for (int j = 0; j <= m; ++j) {
			if (i == 0 && j == 0) continue;
			if (a[cv(i, j)] == 1) {
				for (int q = 1; q <= t; ++q) {
				 	if (i != 0)
						d[cv(i, j)][q] += d[cv(i - 1, j)][q - 1];
					if (j != 0)
						d[cv(i, j)][q] += d[cv(i, j - 1)][q - 1];
					d[cv(i, j)][q] %= z;
				}
			}else {
				for (int q = 0; q <= t; ++q) {
				  if (i != 0)
						d[cv(i, j)][q] += d[cv(i - 1, j)][q];
					if (j != 0)
						d[cv(i, j)][q] += d[cv(i, j - 1)][q];
					d[cv(i, j)][q] %= z;				
				}
			}	
		}
	}
	for (int i = 0; i <= t; ++i) {
		sum += d[cv(n, m)][i];
		sum %= z;
	} */
	printf("%d", sum);
	return 0;
}

Compilation message

turtle.cpp: In function 'int main()':
turtle.cpp:30:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d%d%d%d", &n, &m, &k, &t, &z);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
turtle.cpp:32:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d%d", &x, &y);
    ~~~~~^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Incorrect 2 ms 256 KB Output isn't correct
3 Incorrect 2 ms 256 KB Output isn't correct
4 Incorrect 2 ms 256 KB Output isn't correct
5 Incorrect 2 ms 256 KB Output isn't correct
6 Incorrect 1 ms 256 KB Output isn't correct
7 Incorrect 2 ms 256 KB Output isn't correct
8 Incorrect 2 ms 376 KB Output isn't correct
9 Incorrect 2 ms 296 KB Output isn't correct
10 Incorrect 2 ms 256 KB Output isn't correct
11 Incorrect 2 ms 256 KB Output isn't correct
12 Incorrect 2 ms 256 KB Output isn't correct
13 Incorrect 2 ms 376 KB Output isn't correct
14 Incorrect 2 ms 256 KB Output isn't correct
15 Incorrect 2 ms 376 KB Output isn't correct
16 Incorrect 2 ms 256 KB Output isn't correct
17 Incorrect 2 ms 376 KB Output isn't correct
18 Incorrect 2 ms 256 KB Output isn't correct
19 Incorrect 2 ms 376 KB Output isn't correct
20 Incorrect 2 ms 376 KB Output isn't correct