Search is not available for this dataset
name stringlengths 2 88 | description stringlengths 31 8.62k | public_tests dict | private_tests dict | solution_type stringclasses 2
values | programming_language stringclasses 5
values | solution stringlengths 1 983k |
|---|---|---|---|---|---|---|
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int M = 100000;
int n, ub;
map<int, int> memo[50][2001];
int dfs(int idx, int lb, int sum) {
if (idx == n) return sum == 0;
if (sum < 0 || lb > ub) return 0;
if (memo[idx][lb].count(sum) > 0) return memo[idx][lb][sum];
int cnt = 0;
for (int i = lb; i <= ub; ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <iostream>
#include <vector>
#include <algorithm>
#define repeat(i,n) for (int i = 0; (i) < (n); ++(i))
typedef long long ll;
using namespace std;
const int mod = 100000;
int main() {
while (true) {
int n, m, s; cin >> n >> m >> s;
if (n == 0 and m == 0 and s == 0) break;
vector<vec... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T>
using Table = vector<vector<T>>;
const ld eps = 1e-9;
const int mod = 100000;
struct Mod {
public:
int num;
Mod() : Mod(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) {
static_... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int mod = 100000;
int dp[2][51][3001];
int main() {
while (true) {
int N, M, S;
scanf("%d%d%d", &N, &M, &S);
if (N == 0 && M == 0 && S == 0) break;
N *= N;
memset(dp, 0, sizeof(dp));
int t = 0;
dp[1 - t][0][0] = 1;
for (int i = 0; i < M; i+... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int i, j, k;
int n, m, s;
for (i = 0; scanf("%d%d%d", &n, &m, &s), n; ++i) {
if (i == 1) {
if (n == 2)
for (;;)
;
else if (n == 4)
exit(1);
}
}
puts("a");
return 0;
}
|
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
template <typename T>
vector<T> make_v(size_t a) {
return vector<T>(a);
}
template <typename T>
vector<vector<T> > make_v(size_t a, size_t b) {
return vector<vector<T> >(a, make_v<T>(b));
}
template <typename T>
vector<vector<vector<T> > > make_v(... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int surplus = 100000;
int n, m, s, N, ans, ss[50];
int b[50][2001][3001];
bool judge[50][2001][3001];
int dp(int now, int num, int sum) {
ss[now] = 0;
for (int i = (num); i < (m + 1); i++) {
if (now == N) {
if (sum + i == s) {
return 1;
} e... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int mod = 100000;
int N, M, S;
int main() {
while (cin >> N >> M >> S, N) {
N *= N;
M -= N;
S -= N * (N + 1) / 2;
vector<vector<int> > dp(M + 1, vector<int>(S + 1, 0));
dp[0][0] = 1;
for (int i = 0; i < N; i++) {
vector<vector<int> > dp... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[50][2001][3001];
int main() {
int n, m, s;
while (scanf("%d%d%d", &n, &m, &s), (n | m | s)) {
for (int i = 0; i < n * n + 1; i++)
for (int j = 0; j < m + 1; j++)
for (int k = 0; k < s + 1; k++) dp[i][j][k] = 0;
for (int i = 1; i < m + 1; i++... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 28;
const int mod = 100000;
int n, m, s, dp[2][2001][3001];
int main() {
while (scanf("%d%d%d", &n, &m, &s), n) {
for (int i = 0; i < m + 1; i++)
for (int j = 0; j < s + 1; j++) dp[0][i][j] = 0;
dp[0][0][s] = 1;
int cur = 0, next = 1... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int N, M, S;
int DP[2001][3001];
int DP1[2001][3001];
const int MOD = 100000;
int main() {
scanf("%d%d%d", &N, &M, &S);
for (int j = 1; j <= min(M, S); j++) DP[j][j] = 1;
for (int i = 1; i < N * N; i++) {
for (int j = 1; j <= M; j++) {
for (int k = 1; k <= S... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | java | import java.util.*;
public class Main{
static final int m_max=2001, s_max=3001;
public static void main(String[] args){
Scanner scn = new Scanner(System.in);
int[][][] table = new int[2][m_max][s_max];
int n,m,s;
while(true){
n = scn.nextInt();
n = n*n;
m = scn.nextInt();
s = scn.nextInt();
if(n==0... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T>
using Table = vector<vector<T>>;
const ld eps = 1e-9;
const int mod = 100000;
struct Mod {
public:
int num;
Mod() : Mod(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) {
static_... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
const ll MOD = (ll)1e9 + 7;
const ll MOD2 = 998244353;
const ll HIGHINF = (ll)1e18;
const ll LOWINF = (ll)1e15;
const long double ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
public class Main {
public static final int MAX_N = 7;
public static final int MAX_D = MAX_N * MAX_N;
public static final int MAX_M = 2000;
public static final int MAX_S = 3000;
public static ArrayList<Arra... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | ### constant
MOD = 100000
### main
loop do
n, m, s = gets.strip.split(' ').map{|s| s.to_i}
break if (n | m | s) == 0
nn = n * n
dp = (nn + 1).times.map{(s + 1).times.map{0}}
dp[0][0] = 1
for i in (1..m)
nn.downto(1) do |j|
for k in (i..s)
dp[j][k] = (dp[j][k] + dp[j - 1][k - i]) % MO... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir_8[8][2] = {{1, 0}, {1, 1}, {0, 1}, {-1, 1},
{-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
const int kaijou[10] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int mod = 100000;
int dp[2][50][3001];
void add(int& x, int y) {
x += y;
if (x >= mod) x -= mod;
}
int main() {
while (true) {
int n, m, s;
scanf("%d%d%d", &n, &m, &s);
if (n == 0) break;
n = n * n;
for (int j = 0; j < (n + 1); ++j)
for (int ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const long long hmod1 = 999999937;
const long long hmod2 = 1000000000 + 9;
const long long INF = 1 << 30;
const long long mod = 1000000000 + 7;
const int dx4[4] = {1, 0, -1, 0};
const int dy4[4] = {0, 1, 0, -1};
const int dx8[8] = {1, 1, 1, 0, 0, -1, -1, -1};
const int dy8[... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int x[2000 + 1][3000 + 1];
int y[2000 + 1][3000 + 1];
int z[50][3000];
int sum = 0;
int main() {
int n, m, s, d, e, f, g;
while (true) {
cin >> n >> m >> s;
if ((n == 0 && m == 0) && s == 0) {
break;
}
memset(x, 0, sizeof(x));
memset(y, 0, size... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[2005][55][3005];
int main(void) {
int i, j, k;
int n, m, s;
while (1) {
cin >> n >> m >> s;
if (n == 0) break;
for (i = 0; i < (2005); i++)
for (j = 0; j < (55); j++)
for (k = 0; k < (3005); k++) dp[i][j][k] = 0;
dp[0][0][0] = 1;
... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int B[2001][50][3001];
int main() {
int N, M, S;
while (1) {
cin >> N >> M >> S;
if (N == 0 && M == 0 && S == 0) break;
for (int i = int(0); i <= int(N * N); i++) {
for (int j = int(0); j <= int(S); j++) {
if (i == 0 && j == 0)
B[0][i... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | python3 | # AOJ 0537: Bingo
# Python3 2018.7.1 bal4u
while True:
n, m, s = map(int, input().split())
if n == 0: break
n *= n
dp = [[0 for j in range(3001)] for i in range(n+1)]
dp[0][0] = 1
for i in range(1, m+1):
for j in range(n, 0, -1):
for k in range(i, s+1):
dp[j][k] = (dp[j][k]+dp[j-1][k-i]) % 100000;
prin... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int N, M, S;
int dp[2][2001][3001];
int T[2001][3001];
int main() {
while (cin >> N >> M >> S) {
if (N == 0 && M == 0 && S == 0) break;
for (int j = 1; j <= M; j++) {
for (int k = 1; k <= S; k++) {
dp[0][j][k] = 0;
}
}
for (int i = 1; i... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int N, M, S;
vector<int> mem[50][2001];
int num(int n, int m, int s) {
if (s < mem[n][m].size() && mem[n][m][s] != 0) {
return mem[n][m][s] - 1;
}
if (n == 1) {
if (s <= m) {
return 1;
} else {
return 0;
}
}
int ret = 0;
for (int i = ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
int dp[50][2001][3001];
int main() {
while (1) {
int i;
int n, m, s;
int square;
int first_val;
int sum;
scanf("%d %d %d", &n, &m, &s);
if (n == 0 && m == 0 && s == 0) {
return 0;
}
square = n * n;
first_val = square * (square + 1) / 2;
for (i... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
int dp[50][2001][3001];
int main() {
memset(dp, 0, sizeof(dp));
for (int i = 0; i <= 2000; i++) dp[0][i][0] = 1;
for (int i = 1; i <= 2000; i++) {
for (int j = 1; j <= 49; j++) {
for (int k = 0; k <= 3000; k++) {
dp[j][i][k] += dp[j][i - 1][k];
if (k - i >= 0) dp... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int i, j, k;
int n, m, s;
int hoge = 0;
while (scanf("%d%d%d", &n, &m, &s), n) {
++hoge;
if (hoge >= 6) exit(1);
}
puts("a");
return 0;
}
|
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int N, M, S, dp[2001][3001];
int ths(int begin, int end, int count) { return ((begin + end) * count) / 2; }
int main(void) {
for (int i = 0; i < 50; i++) {
for (int ii = 0; ii < 3001; ii++) dp[i][ii] = 0;
}
cin >> N >> M >> S;
dp[0][0] = 1;
int t = ths(1, N * ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include<bits/stdc++.h>
using namespace std;
int dp[2200][3200],_prev[2200][3200],n,m,s;
int main(){
while(true){
cin>>n>>s>>m;if(n==0)return 0;n*=n;
for(int i=0;i<2200;i++){fill(dp[i],dp[i]+3200);fill(_prev[i],_prev[i]+3200);}
for(int i=0;i<=s;i++)_prev[i][0]=1;
for(int i=0;i<n;i++){
for(int j=1;j<=s;j++){... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int N, M, S;
int dp[2][2001][3001];
int main() {
while (cin >> N >> M >> S) {
if (N == 0 && M == 0 && S == 0) break;
for (int i = 0; i < 2; i++) {
for (int j = 0; j <= M; j++) {
for (int k = 0; k <= S; k++) {
dp[i][j][k] = 0;
}
... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, s, ans;
int dp[50][2001][3001];
int main() {
while (cin >> n >> m >> s && n) {
memset(dp, 0, sizeof(dp));
dp[0][0][0] = 1;
for (int i = 0; i < n * n; ++i) {
for (int j = 0; j < m; ++j) {
for (int k = 0; k < s; ++k) {
dp[i + 1]... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int _dx[] = {0, 1, 0, -1};
const int _dy[] = {-1, 0, 1, 0};
int getInt() {
int ret = 0, c;
c = getchar();
while (!isdigit(c)) c = getchar();
while (isdigit(c)) {
ret *= 10;
ret += c - '0';
c = getchar();
}
return ret;
}
int n, m, second;
int me... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | import std.algorithm;
import core.stdc.stdio;
void main(){
while(1){
int n,m,s;
scanf("%d%d%d",&n,&m,&s);
if(n==0&&m==0&&s==0)
break;
int[] now = new int[(m+1)*(s+1)];
int[] next = new int[(m+1)*(s+1)];
now[0] = 1;
int minM=0;
int minS=0;
for(int _=0;_<n*n;_++){
next[] = 0;
int nmm = 114514... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int M;
int *done;
int *memo;
int num(int i, int N, int S) {
if (S < 0) {
return (0);
}
if (done[i * 50 * 3100 + N * 3100 + S]) {
return (memo[i * 50 * 3100 + N * 3100 + S]);
}
if (N == 0) {
return (S == 0);
}
if (i > M) {
return (0);
}
done[i * 50 * 3100 + N * ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int N, M, S;
int dp[50][2001][3001];
int main() {
while (cin >> N >> M >> S) {
if (N == 0 && M == 0 && S == 0) break;
for (int i = 0; i < N * N; i++) {
for (int j = 0; j <= M; j++) {
for (int k = 0; k <= S; k++) {
dp[i][j][k] = 0;
}... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int N, M, S;
vector<int> mem[50][2001];
int num(int n, int m, int s) {
if (n == 2) {
if (s > m) {
if (m > s - m) {
return (m - (s - m) + 1) / 2;
} else {
return 0;
}
} else {
return (s - 1) / 2;
}
} else if (n == 1) {
... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int mod = 100000;
int dp[2][50][3001];
int main() {
while (true) {
int N, M, S;
scanf("%d%d%d", &N, &M, &S);
if (N == 0 && M == 0 && S == 0) break;
N *= N;
memset(dp, 0, sizeof(dp));
int t = 0;
dp[1 - t][0][0] = 1;
for (int i = 0; i < M; i+... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
while (true) {
int N, M, S;
cin >> N >> M >> S;
if (N == 0) return 0;
M = min(M, S);
int dp[50][3001];
for (int i = 0; i < 50; i++) {
for (int j = 0; j < 3001; j++) {
dp[i][j] = 0;
}
}
dp[0][0] = 1;
for ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir_8[8][2] = {{1, 0}, {1, 1}, {0, 1}, {-1, 1},
{-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
const int kaijou[10] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
int dp[50][3001];
int main() {
int n, m, s;
while (scanf("%d %d %d", &n, &m, &s), n) {
memset(dp, 0, sizeof(dp));
dp[0][0] = 1;
for (int i = 1; i <= m; i++)
for (int j = n * n; j >= 1; j--)
for (int k = m; k <= s; k++) {
dp[j][k] += dp[j - 1][k - i];
... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir_8[8][2] = {{1, 0}, {1, 1}, {0, 1}, {-1, 1},
{-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
const int kaijou[10] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int N, M, S;
int dp[2][3001][2001];
const int MOD = 100000;
int main() {
while (cin >> N >> M >> S, N * M) {
for (int i = 1; i <= S; i++) {
dp[0][i][i] = 1;
}
for (int i = 0; i < N * N - 1; i++) {
for (int j = 1; j <= S; j++) {
for (int k =... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
while (true) {
int N, M, S;
cin >> N >> M >> S;
if (N == 0) return 0;
int dp[50][3001];
for (int i = 0; i < 50; i++) {
for (int j = 0; j < 3001; j++) {
dp[i][j] = 0;
}
}
dp[0][0] = 1;
for (int i = 1; i <= M;... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, s;
while (cin >> n >> m >> s) {
if (n == 0 && m == 0 && s == 0) break;
int dp[2][2002][3002];
for (long long i = 0; i < (long long)(2); i++)
for (long long j = 0; j < (long long)(2002); j++)
for (long long k = 0; k < (lon... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<numeric>
#include<cassert>
#define f first
#define s second
#define mp make_pair
#define ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
int bingo[2001][3001];
int main() {
int works1[3001];
int works2[3001];
while (1) {
int n, m, s;
scanf("%d%d%d", &n, &m, &s);
if (n == 0) return 0;
memset(bingo, '\0', sizeof(bingo));
for (int k = 1; k <= m; k++)
if (k * n * n <= s)
bingo[k][k * (n * n)] ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T>
using Table = vector<vector<T>>;
const ld eps = 1e-9;
const int mod = 100000;
struct Mod {
public:
int num;
Mod() : Mod(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) {
static_... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <iostream>
#include <cstring>
using namespace std;
int dp[59][3001];
int main(void)
{
while(1)
{
int num,max,sum;
cin >> num >> max >> sum;
if(num+max+sum == 0)
return 0;
memset(dp,0,sizeof(dp));
dp[0][0] = 1;
for(int m=1;m<=max;++m)//その数を使ッた時のあれ
{
for(int n=num*num;n>=1;--n)//どの数が使う?... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int N, M, S;
int dp[2010][50][3010];
int main() {
while (true) {
cin >> N >> M >> S;
if (N == 0) break;
for (int i = 0; i < 2010; i++) {
for (int j = 0; j < 50; j++) {
for (int k = 0; k < 3010; k++) {
dp[i][j][k] = 0;
}
}
... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
unsigned short dp[162617];
int main(void) {
int i, j, k;
int n, m, s;
while (scanf("%d%d%d", &n, &m, &s), n) {
n *= n;
dp[0] = 0;
dp[1] = 0x8000;
for (i = 2; i < 162617; ++i) dp[i] = 0;
for (i = 1; i <= m; ++i) {
for (j = n; j >= 0; --j) {
for (k = s; k >... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 28;
const double INF = 1e12, EPS = 1e-9;
int n, m, s;
int dp[2][2001][3001];
int main() {
while (scanf("%d%d%d", &n, &m, &s), n) {
for (int j = 0; j < m + 1; j++)
for (int k = 0; k < s + 1; k++) dp[0][j][k] = 0;
dp[0][0][0] = 1;
m = ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int mod = 100000;
int dp[3000][2000][49];
int n, m, s;
int main() {
while (1) {
cin >> n >> m >> s;
if (n == 0 && m == 0 && s == 0) break;
memset(dp, -1, sizeof(dp));
}
}
|
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const long long MOD = 100000;
struct edge {
long long to, cost;
edge(int t, long long c) : to(t), cost(c) {}
};
int dxk[] = {1, 1, 1, 0, -1, 0};
int dxg[] = {0, 1, 0, -1, -1, -1};
int dy[] = {-1, 0, 1, 1, 0, -1};
int bitcount(int a) {
int ret ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int N, M, S, B[81], dp[81][2005][3005];
int dfs(int d, int m, int s) {
int i, r = 0;
if (dp[d][m][s] != -1) return dp[d][m][s];
if (d > N * N || m > M || s > S) return 0;
if (d == N * N && s == S) return 1;
for (i = m + 1; i <= M && s + i <= S; i++) {
B[d] = i;
r = (r + dfs(d ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[3005][50] = {};
int n, m, s;
int main() {
while (1) {
scanf("%d %d %d", &n, &m, &s);
if (!n) break;
dp[0][0] = 1;
for (int i = 1; i <= m; i++) {
for (int k = i; k <= s; k++) {
for (int j = 1; j <= n * n; j++) {
dp[k][j] += dp... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
static const long long INF = 1LL << 61LL;
static const double EPS = 1e-8;
static const int mod = 100000;
int N, M, S;
int mem[50][500][3001];
long long cal(int n, int mx, int sum) {
long long res = 0;
if (sum > S) return 0;
if (mem[n][mx][sum] != -1) return mem[n][mx]... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[50][2001][3001];
int main(void) {
int ans = 0;
int N, M, S;
while (scanf("%d%d%d", &N, &M, &S), N) {
for (int i = 1; i <= M; i++) {
dp[1][i][i] = 1;
}
for (int i = 1; i <= N * N; i++) {
for (int j = i; j <= M; j++) {
for (int k =... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T>
using Table = vector<vector<T>>;
const ld eps = 1e-9;
const int mod = 100000;
struct Mod {
public:
int num;
Mod() : Mod(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) {
static_... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int dp1[50][3001];
int dp2[50][3001];
int mod = 100000;
int n, m, s;
while (scanf("%d%d%d", &n, &m, &s)) {
if (n == 0 && m == 0 && s == 0) break;
memset(dp1, 0, sizeof(dp1));
dp1[0][0] = 1;
for (int i = 1; i <= m; i++) {
memset(d... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int mod = 100000;
int N, M, S;
int dp[2009][3009];
int dpsum[2009][3009];
int main() {
while (true) {
scanf("%d%d%d", &N, &M, &S);
if (N == 0 && M == 0 && S == 0) break;
dp[0][0] = 1;
for (int i = 1; i <= N * N; i++) {
for (int j = 0; j <= M; j++) {
... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
int main() {
while (1) {
int i;
int n, m, s;
unsigned int dp[2][2001][3001];
unsigned int sum;
scanf("%d %d %d", &n, &m, &s);
if (n == 0 && m == 0 && s == 0) return 0;
for (i = 0; i < 2; i++) {
int j;
for (j = 1; j <= m; j++) {
int k;
fo... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | using namespace std;
#define SUM 30010
#define DIV 100000
int table[49][SUM]={0};
int solve(int N,int M,int S){
for(int i=0;i<N;i++)
for(int j=0;j<=S;j++)table[i][j]=0;
for(int i=1;i<=M;i++){
for(int j=N-1;j>=0;j--){
for(int k=1;k<S;k++){
if ( table[j][k] == 0)continue;
if ( k+i >S)break;
ta... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int dp[7][7][3000][2000];
int main() {
int n, m, s;
cin >> n >> m >> s;
memset(dp, 0, sizeof(dp));
}
|
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, s;
int d[501][50][501] = {};
int dp(int a, int b, int c) {
if (a <= 500 && c <= 500) {
if (d[a][b][c]) {
return d[a][b][c];
}
}
if (a <= 0 && b != n * n) {
return 0;
}
if (c > m - (n * n - b)) {
return 0;
}
if (b > n * n) {
... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#include <map>
#include <set>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define INF_LL 1e18
#define INF 1e9
#define REP(i, n) for(int i = ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int M = 100000;
int main() {
int n, m, s, dp[50][3001];
while (cin >> n >> m >> s && (n | m | s)) {
fill(dp[0], dp[50], 0);
dp[0][0] = 1;
for (int k = 1; k <= m; k++) {
for (int i = n * n; i > 0; i--) {
for (int j = i; j <= s; j++) {
... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int surplus = 100000;
int n, m, s, sum, N, ans;
int b[50][3001][2001];
int main() {
for (int i = (1); i < (2001); i++) {
b[1][i][i] = 1;
}
for (int i = (1); i < (50); i++) {
for (int j = (i); j < (3001); j++) {
for (int k = (i - 1); k < (3001); k++... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[50][2][3001];
int main() {
while (1) {
int n, m, s;
scanf("%d%d%d", &n, &m, &s);
if (n == 0) break;
int t1 = 0, t2 = 1;
n *= n;
for (int i = 0; i < 50; i++)
for (int j = 0; j < 2; j++)
for (int k = 0; k < s + 1; k++) dp[i][j][k... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir_8[8][2] = {{1, 0}, {1, 1}, {0, 1}, {-1, 1},
{-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
const int kaijou[10] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[2][3001][50];
const int mod = 100000;
int n, m, s;
int main() {
while (cin >> n >> m >> s && (n | m | s)) {
memset(dp, 0, sizeof(dp));
for (int i = m; i >= 0; i--) {
for (int j = 0; j <= s; j++) {
for (int k = n * n; k >= 0; k--) {
i... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
long long dp[2][2001][3001];
int min(int a, int b) { return a < b ? a : b; }
int main() {
int n, m, s;
int i, j, k, l;
while (1) {
scanf("%d %d %d", &n, &m, &s);
if (n == 0) return 0;
for (i = 0; i <= m; i++)
for (j = 0; j <= s; j++) dp[1][i][j] = 0;
dp[1][0][0] = 1;... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
int n, m, s, table[2][2001][3001];
int main() {
while (scanf("%d%d%d", &n, &m, &s), s) {
n *= n;
for (int i = 1; i <= m; i++)
for (int j = 1; j <= n; j++) table[0][i][j] = (i >= j) ? 1 : 0;
for (int i = 1; i < n; i++) {
for (int j = 1; j <= m; j++) {
for (int k... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int i, j, k;
int n, m, s;
int hoge = 0;
while (scanf("%d%d%d", &n, &m, &s), n) {
++hoge;
if (hoge >= 4) exit(1);
}
puts("a");
return 0;
}
|
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
while (true) {
int N, M, S;
cin >> N >> M >> S;
if (N == 0) return 0;
int dp[50][3001];
for (int i = 0; i < 50; i++) {
for (int j = 0; j < 3001; j++) {
dp[i][j] = 0;
}
}
dp[0][0] = 1;
for (int i = 1; i <= M;... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir_8[8][2] = {{1, 0}, {1, 1}, {0, 1}, {-1, 1},
{-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
const int kaijou[10] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T>
using Table = vector<vector<T>>;
const ld eps = 1e-9;
const int mod = 100000;
struct Mod {
public:
int num;
Mod() : Mod(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) {
static_... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
const ll MOD = (ll)1e9 + 7;
const ll MOD2 = 998244353;
const ll HIGHINF = (ll)1e18;
const ll LOWINF = (ll)1e15;
const long double ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
unsigned short dp[162617];
int get(int b) {
return (((dp[b + b / 16] & ((1 << (16 - b % 16)) - 1))) << (b % 16 + 1)) +
(dp[b + b / 16 + 1] >> (15 - b % 16));
}
void set(int b, int v) {
dp[b + b / 16] &= 0xffff - (1 << (16 - b % 16)) + 1;
dp[b + b / 16] |= v >> (b % 16 + 1);
dp[... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir_8[8][2] = {{1, 0}, {1, 1}, {0, 1}, {-1, 1},
{-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
const int kaijou[10] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int dp[55][3010];
int n, m, s;
while (1) {
fill((int*)dp, ((int*)dp + 3010), 0);
cin >> n >> m >> s;
const int bin = n * n;
dp[0][0] = 1;
for (int k = 1; k <= m; k++)
for (int i = bin; i > 0; i--) {
for (int j = k; j <= s... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[50][3001];
int main() {
int n, m, s;
while (scanf("%d %d %d", &n, &m, &s)) {
if (n == 0 && m == 0 && s == 0) break;
memset(dp, 0, sizeof(dp));
dp[0][0] = 1;
for (int i = 1; i <= m; i++) {
for (int j = n * n; j > 0; j--) {
for (int k ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <iostream>
#include <vector>
#include <algorithm>
#define repeat(i,n) for (int i = 0; (i) < (n); ++(i))
using namespace std;
const int mod = 100000;
int main() {
while (true) {
int n, m, s; cin >> n >> m >> s;
if (n == 0 and m == 0 and s == 0) break;
vector<vector<int> > cur(s+1, ve... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | java | import static java.util.Arrays.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
static void tr(Object... os) {
System.err.println(deepToString(os));
}
sta... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, s;
while (cin >> n >> m >> s && (n || m || s)) {
long long dp[51][3001] = {};
dp[0][0] = 1;
for (int i = 1; i <= m; i++) {
for (int j = n * n; j >= 1; j--) {
for (int k = 1; k <= s; k++) {
if (k - i >= 0) dp[j][... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int M;
map<int, int> mem[50][2001];
int num(int low, int len, int sum) {
if (len == 1) {
if (low < sum && sum <= M) {
return 1;
}
return 0;
}
if (mem[len][low].find(sum) != mem[len][low].end()) {
return mem[len][low][sum];
}
int ret = 0;
fo... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int mod = 100000;
int N, M, S;
int dp[2009][3009];
int dpsum[2009][3009];
int main() {
while (true) {
scanf("%d%d%d", &N, &M, &S);
if (N == 0 && M == 0 && S == 0) break;
dp[0][0] = 1;
for (int i = 1; i <= N * N; i++) {
for (int j = 0; j <= M; j++) {
... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<numeric>
#include<cassert>
#define f first
#define s second
#define mp make_pair
#define ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
const int M = 100000;
int main() {
for (int n, m, sum; scanf("%d%d%d", &n, &m, &sum), n;) {
n *= n;
static int dp[2001][3001], next[2001][3001];
for (int d = 0; d < (m + 1); d++) dp[d][0] = 1;
for (int i = 0; i < (n); i++) {
for (int d = 1; d <= m; d... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include<iostream>
using namespace std;
#define NUM 2001
#define SUM 3001
#define DIV 100000
map<pair<short,short>,int >Map[49];
int solve(short pos,short sum,short now,int N,int M,int S){
if ( pos == N*N){
if ( sum == S)return 1;
return 0;
}
map<pair<short,short> ,int >::iterator itr = Map[pos].find(m... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[2][3001][50];
int n, m, s;
int main() {
while (cin >> n >> m >> s && (n | m | s)) {
memset(dp, 0, sizeof(dp));
for (int i = 0; i < 2; i++) dp[i][0][n * n] = 1;
for (int i = m; i >= 0; i--) {
for (int j = 0; j <= s; j++) {
for (int k = n * ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, s;
int memo[2001][3001][50];
int dfs(int num, int sum, int cou) {
if (cou == n * n + 1) {
if (sum == s)
return 1;
else
return 0;
}
if (memo[num][sum][cou] != -1) return memo[num][sum][cou];
int ret = 0;
for (int i = num; i <= m; i++) ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
namespace std {
template <>
class hash<tuple<int, int, int>> {
public:
size_t operator()(const tuple<int, int, int>& x) const {
return hash<int>()(get<0>(x)) ^ hash<int>()(get<1>(x)) ^
hash<int>()(get<2>(x));
}
};
} // namespace std
unordered_map<tuple<... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int x[2000 + 1][3000 + 1];
int y[2000 + 1][3000 + 1];
int main() {
int n, m, s;
while (true) {
cin >> n >> m >> s;
if ((n == 0 && m == 0) && s == 0) {
break;
}
memset(x, 0, sizeof(x));
memset(y, 0, sizeof(y));
for (int i = 1; i <= m; i++) {... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <iostream>
#include <vector>
#include <algorithm>
#define repeat(i,n) for (int i = 0; (i) < (n); ++(i))
typedef long long ll;
using namespace std;
const ll mod = 100000;
int main() {
while (true) {
int n, m, s; cin >> n >> m >> s;
if (n == 0 and m == 0 and s == 0) break;
vector<vect... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[2][2000][3000];
signed main() {
int a, b, c;
while (cin >> a >> b >> c, a || b || c) {
a *= a;
c -= a * (a + 1) / 2;
b -= a;
memset(dp, 0, sizeof(dp));
dp[0][0][0] = 1;
for (int d = 1; d <= a; d++) {
memset(dp[d & 1], 0, sizeof(dp[d ... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static final int MAX_N = 7;
public static final int MAX_M = 2000;
public static final int MAX_S = 3000;
public static int[][] DP = new int[MAX_S + 1][MAX_M + 1];
public static int[][] next = new int[MAX... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int i, j, k;
int n, m, s;
int hoge = 0;
while (scanf("%d%d%d", &n, &m, &s), n) {
++hoge;
if (hoge >= 50) exit(1);
}
puts("a");
return 0;
}
|
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
char dp[51 * 3001];
int main(void) {
int i, j, k;
int n, m, s;
while (scanf("%d%d%d", &n, &m, &s), n) {
n *= n;
dp[0] = 1;
for (i = 1; i < 3001 * 51; ++i) dp[i] = 0;
for (i = 1; i <= m; ++i) {
for (j = n; j >= 0; --j) {
for (k = s; k >= 0; --k) {
if... |
p00460 Bingo | problem
In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions.
* The Bingo card is divided into squares of N rows and N columns, and one posi... | {
"input": [
"3 9 45\n3 100 50\n5 50 685\n0 0 0"
],
"output": [
"1\n7\n74501"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[2][2001][3001];
const int mod = 100000;
int main() {
int n, m, s;
while (cin >> n >> m >> s) {
if (n == 0) break;
n *= n;
dp[0][0][0] = 1;
for (int i = 0; i < n; i++) {
int now = i & 1;
int next = now ^ 1;
for (int j = 0; j <= m;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.