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 | UNKNOWN | MOD = 100000
until (n, m, s = gets.split.map(&:to_i)).all?(&:zero?)
dp = Array.new(m + 1){Array.new(n * n + 1){Array.new(s + 1, 0)}}
dp[0][0][0] = 1
(1 .. m).each do |i|
dp[i] = Marshal.load(Marshal.dump(dp[i - 1]))
(1 .. n * n).each do |j|
(i .. s).each do |k|
dp[i][j][k] += dp[i - 1][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 |
using namespace std;
int N, M, S, cnt;
void DFS(int num, int rest, int sum){
if( rest == 0 ){
if( sum + num > S ){
return ;
}else{
cnt++;
return ;
}
}
for(int i = num; i <= M - rest; i++){
int tmp = sum;
for( int j = num; j < rest + 1; j++ ){
tmp += j;
}
if( tmp > S ){
return ;
}
... |
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 <bits/stdc++.h>
using namespace std;
int main() {
for (int n, m, sum; scanf("%d%d%d", &n, &m, &sum), n;) {
n *= n;
static int dp[50][2001][3001];
for (int d = 0; d < (m + 1); d++) dp[0][d][0] = 1;
for (int i = 0; i < (n); i++)
for (int d = 1; d <= m; d++)
for (int s = 0; s < (su... |
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 | dp[55][3005],n,m,s,i,j;main(k){for(;scanf("%d%d%d",&n,&m,&s)&n;printf("%d\n",dp[n*n][s])){for(i=0;i<50;i++)for(j=0;j<=s;)dp[i][j++]=!i&!j;for(i=1;i<=m;i++)for(j=50;j>0;j--)for(k=i;k<=s;)dp[j][k++]=(dp[j-1][k-i]+dp[j][k])%100000;}} |
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[3000 + 1][2000 + 1][2];
vector<int> ns[8];
vector<int> ms, ss;
vector<int> ret;
int main() {
while (1) {
cin >> N >> M >> S;
if (N == 0 && M == 0 && S == 0) break;
ns[N].push_back((int)ms.size());
ms.push_back(M);
ss.push_back(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 n, m, s;
int dp[50][3001][2001];
int main() {
while (1) {
scanf("%d %d %d", &n, &m, &s);
if (n == 0) break;
memset(dp, 0, sizeof(dp));
for (int i = 1; i < m + 1; i++) {
dp[1][i][i] = 1;
}
for (int i = 2; i < n * n + 1; i++) {
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 |
//y09-6 ビンゴ(2回目)
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace... |
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];
int main() {
int n, m, s;
while (cin >> n >> m >> s && n) {
memset(dp, 0, sizeof(dp));
n = n * n;
for (int i = 1; i <= m; i++) dp[0][i][i] = 1;
for (int i = 1; i < n; i++) {
for (int j = 0; j < 2001; 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 | python2 | mod=100000
while 1:
n,m,s=map(int,raw_input().split())
if n==m==s==0:break
dp=[[[0]*(s+1) for _ in xrange(m+2)] for _ in xrange(2)]
for i in xrange(n**2):
for j in xrange(1,m+1):
for k in xrange(1,s+1):
if i==0:
if j>=k:
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][100][1001];
long long cal(int n, int mx, int sum) {
long long res = 0;
if (mem[n][mx][sum] != -1) return mem[n][mx][sum];
if (n == 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>
using namespace std;
const int surplus = 100000;
int n, m, s, N, ans, ss[50];
int b[50][3001];
bool judge[50][2001][3001];
int dp(int now, int num, int sum) {
if (sum > s) return 0;
ss[now] = 0;
for (int i = (num); i < (m + 1); i++) {
if (now == N) {
if (sum + i == 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[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 = 0; i < 2; i++) dp[i][0][n * n] = 1;
for (int i = m; i >= 0; i--) {
for (int j = 0; 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 <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
int n, m, s;
long long int dp[50][3001][2001];
int main(){
while(1){
scanf("%d %d %d", &n, &m, &s);
if(n == 0) break;
memset(dp, 0, sizeof(dp));
for(int i=1; i<m+1; i++){
dp[1][i][i] = 1;
}
for(int i=2; i<n*n+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 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 <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[3000 + 1][2000 + 1];
int dp2[3000 + 1][2000 + 1];
vector<int> ns[8];
vector<int> ms, ss;
vector<int> ret;
int main() {
while (1) {
cin >> N >> M >> S;
if (N == 0 && M == 0 && S == 0) break;
ns[N].push_back((int)ms.size());
ms.push_back(... |
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[2][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[1][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 dp[50][2001][3001];
int main() {
for (int i = 1; i <= 2000; i++) {
dp[1][i][i] = 1;
}
for (int i = 1; i < 49; i++) {
for (int j = 1; j < 2000; j++) {
for (int k = 1; k < 3000; k++) {
if (k + j + 1 > 3000) break;
dp[i + 1][j + 1][k + 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[50][3001][2001];
int main() {
while (1) {
scanf("%d %d %d", &n, &m, &s);
if (n == 0) break;
memset(dp, 0, sizeof(dp));
for (int i = 1; i < m + 1; i++) {
if (i <= s) dp[1][i][i] = 1;
}
for (int i = 2; i < n * n + 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;
constexpr int mod = 100000;
int main() {
int N, M, S;
cin >> N >> M >> S;
vector<vector<long long>> dp(S + 1, vector<long long>(M + 1, 0));
dp[0][0] = 1;
for (int i = 0; i < N * N; i++) {
vector<vector<long long>> nxt(S + 1, vector<long long>(M + 1, 0));
f... |
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 | 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 >= 12) 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 | java | import java.util.Scanner;
//Bingo
public class Main{
void run(){
Scanner sc = new Scanner(System.in);
int MOD = 100000;
// long T = System.currentTimeMillis();
int[][][] dp = new int[2][2001][3001];
for(;;){
int N = sc.nextInt(), M = sc.nextInt(), S = sc.nextInt();
if((N|M|S)==0)break;
N*=N;
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 int surplus = 100000;
int N, ans;
int b[50][2001][3001];
int main() {
int n, m, s;
while (cin >> n >> m >> s) {
if (!n && !m && !s) return 0;
ans = 0;
N = n * n;
for (int i = (1); i < (m); i++) b[1][i][i] = 1;
for (int i = (1); i < (N + 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 dp[2][55][3005];
int n, m, s;
int main(void) {
cin >> n >> m >> s;
n *= n;
dp[0][0][0] = 1;
for (int i = 1; i <= m; i++) {
for (int j = 0; j <= n; j++) {
for (int k = j * (j + 1) / 2; k <= min(s, (i * 2 - j + 1) * j / 2); k++) {
dp[i % 2][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 | UNKNOWN | #include <bits/stdc++.h>
int main() {
for (int n, m, s, i, j, d[50][3500], M = 1e5;
std::cin >> n >> m >> s, n *= n;) {
std::fill(d[0], d[50], M);
d[0][0] = 1;
for (i = 1; i <= n; ++i)
for (j = 0; j <= s; ++j) {
if (j >= i) d[i][j] += d[i - 1][j - i] + d[i][j - i];
if (j > 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>
int dp[50][3001];
int main() {
while (1) {
int i;
int n, m, s;
int square;
scanf("%d %d %d", &n, &m, &s);
if (n == 0 && m == 0 && s == 0) {
return 0;
}
memset(dp, 0, sizeof(dp));
square = n * n;
dp[0][0] = 1;
for (i = 1; i < m + 1; i++) {
in... |
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 >= 100) 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() {
int N, M, S;
cin >> N >> M >> S;
vector<vector<int> > dp(N * N + 1, vector<int>(S + 1, 0));
dp[0][0] = 1;
for (int i = 1; i <= M; i++) {
for (int j = N * N; j >= 1; j--) {
for (int k = i; 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 MAXN = 7;
const int MAXM = 2005;
const int MAXS = 3005;
const int mod = 100000;
int N, M, S;
int dp[2][MAXM][MAXS];
int main() {
while (cin >> N >> M >> S && (N | M | S)) {
fill(dp[0][0], dp[2][0], 0);
dp[0][0][0] = 1;
for (int i = 0; i < N * N; ++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() {
int n, m, s;
while (cin >> n >> m >> s) {
if (n == 0 && m == 0 && s == 0) break;
int dp[2][2300][3300];
for (long long i = 0; i < (long long)(2); i++)
for (long long j = 0; j < (long long)(2300); 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 <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 = 1; j <= M; j++) {
for (int k = 1; 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 dp[7 * 7 + 1][3000 + 1];
int main() {
int N, M, S;
scanf("%d %d %d", &N, &M, &S);
dp[0][0] = 1;
for (int k = 1; k <= M; ++k) {
for (int i = N * N; i >= 1; --i) {
for (int j = k; j <= S; ++j) {
dp[i][j] += dp[i - 1][j - k];
dp[i][j] %= 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 dp[2][2048][64];
int N, M, S;
int main(void) {
while (scanf("%d %d %d", &N, &M, &S) && N != 0) {
bool flg = false;
for (int i = 0; i < 2048; i++) {
for (int j = 0; j < 64; j++) {
dp[0][i][j] = 0;
dp[1][i][j] = 0;
}
}
dp[flg]... |
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;
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 _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 | cpp | #include <bits/stdc++.h>
using namespace std;
int dp[50][2001][3001];
int func(int n, int m, int s) {
if (s < 0) return 0;
if (dp[n][m][s] != -1) return dp[n][m][s];
if (n == 0) {
if (s == 0)
return 1;
else
return 0;
}
int res = 0;
for (int i = 1; i < m + 1; i++) {
res += func(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 DP[50][2001][3001];
int main() {
int n, m, s;
long long int sum;
for (int i = 0; i < 50; i++) {
for (int j = 0; j <= 2000; j++) {
for (int k = 0; k <= 3000; k++) {
DP[i][j][k] = 0;
}
}
}
DP[1][1][1] = 1;
for (int i = 1; i < 50; 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 == 0) {
if (n % 4 == 0) {
for (;;)
;
}
if (n % 4 == 1) {
exit(1);
}
if (n % 4 == 2) {
puts("a");
... |
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[64][3005];
int main() {
while (scanf("%d%d%d", &N, &M, &S) && N || M || S) {
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 s = 0; s <= S; 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 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 <bits/stdc++.h>
using namespace std;
int dp[2][2001][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 < 2; i++)
for (int j = 0; j < m + 1; j++)
for (int k = 0; k < s + 1; k++) dp[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;
static const double EPS = 1e-10;
static const double PI = acos(-1.0);
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const long long LL_INF = 1ll << 60;
static const int dx[] = {-1, 0, 1, 0, 1, -1, 1, -1};
static const int dy[] = {0, -1, 0, 1, 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 | cpp | #include <bits/stdc++.h>
using namespace std;
const long long mod = 100000;
long long dp[50][3001];
long long N, M, S;
int main() {
scanf("%lld%lld%lld", &N, &M, &S);
N *= N;
dp[0][0] = 1;
for (long long i = 1; i <= M; i++) {
for (long long j = N; j >= 1; j--) {
for (long long k = i; 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;
int dp[2][2001][3001];
const int mod = 100000;
int main() {
int n, m, s;
while (cin >> n >> m >> s, n) {
n = n * n;
for (int i = 0; i <= m; i++) {
for (int j = 0; j <= s; j++) dp[0][i][j] = 0;
}
dp[0][0][0] = 1;
for (int i = 0; i < n; 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 | java | import java.util.Arrays;
import java.util.Scanner;
public class Main {
static final int mod = 100000;
static int dp[][][];
static int n, m, s;
public static int dp(int k, int v, int t) {
if (0 <= dp[k][v][t]) {
return dp[k][v][t];
}
if (k == n * n - 1) {
if (v == t) {
return dp[k][v][t] = 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;
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][2001][3001];
long long cal(int n, int mx, int sum) {
long long res = 0;
if (mem[n][mx][sum] != -1) return mem[n][mx][sum];
if (n == 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>
using namespace std;
const int mod = 100000;
int n, m, s;
int dp[50][2010][3010];
int dfs(int i = 0, int pre = 0, int sum = 0) {
if (i == n * n) return sum == s;
if (pre > m) return 0;
int &ret = dp[i][pre][sum];
if (ret != -1) return ret;
int cnt = 0;
for (int j = pre + 1; j <= 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 N, M, S;
int dp[2010][50][3010];
int main() {
cin >> N >> M >> S;
dp[0][0][0] = 1;
for (int i = 0; i <= M; i++) {
for (int s = 0; s <= S; s++) {
for (int k = 0; k < N * N; k++) {
dp[i + 1][k][s] = (dp[i + 1][k][s] + dp[i][k][s]) % 100000;
... |
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[2010][59][3010];
int main() {
int N, M, S, n2;
while (1) {
cin >> N >> M >> S;
if (N == 0 && M == 0 && S == 0) break;
n2 = N * N;
for (int k = 0; k <= M; k++) {
for (int i = 0; i <= n2; i++) {
for (int j = 0; 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 | java | import java.util.*;
import java.math.*;
import java.awt.geom.*;
import java.io.*;
public class Main {
static int INF = 2 << 29;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
int n = sc.nextInt();
int m = sc.nextInt();
int s = sc.nextInt();
if(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;
long long dp[2][2000][3000];
signed main() {
long long 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 (long long d = 1; d <= a; d++) {
memset(dp[d & 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 |
//y09-6 ビンゴ(2回目)
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace... |
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;
int main() {
int n, m, s;
scanf("%d%d%d", &n, &m, &s);
n *= n;
int** dp = new int*[n + 1];
for (int i = 0; i < int(n + 1); ++i) {
dp[i] = new int[s + 1];
fill(dp[i], dp[i] + s + 1, 0);
}
dp[0][0] = 1;
for (int i = 1; i < int(m + 1); ++i) {
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>
using namespace std;
int dp[2][2001][3001];
const int mod = 100000;
int main() {
int n, m, s;
cin >> n >> m >> s;
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; j++)
for (int k = 0; k <= s; k++) 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 dp[55][2005][3005];
int main() {
int h, i, j, k, n, m, s, ans;
while (1) {
scanf("%d%d%d", &n, &m, &s);
if (n + m + s == 0) break;
memset(dp, 0, sizeof(dp));
ans = 0;
n = n * n;
for (i = 1; i <= m; i++) dp[0][i][i] = 1;
for (i = 1; i < n; i++) {
for (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 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 dp[2][2048][64];
int N, M, S;
int main(void) {
while (scanf("%d%d%d", &N, &M, &S) && N != 0) {
int flg = 0;
for (int i = 0; i < 2048; i++) {
for (int j = 0; j < 64; j++) {
dp[0][i][j] = 0;
dp[1][i][j] = 0;
}
}
dp[0][0][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>
int a[50][2001][3001];
int main() { 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 | UNKNOWN | ## constant
MOD = 100000
MAX_M = 500
MAX_S = 1000
### subroutines
def counts(nn, m, s)
if nn == 1
return (m >= s ? 1 : 0)
end
if m <= MAX_M && s <= MAX_S && ! $ccache[nn][m][s].nil?
return $ccache[nn][m][s]
end
m0 = m - 1
s0 = s - nn
c = 0
while m0 > 0 && s0 > 0
c = (c + counts(nn - 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 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 <= 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 | java | import java.util.Scanner;
//Bingo
public class Main{
void run(){
Scanner sc = new Scanner(System.in);
int MOD = 100000;
int[][][] dp = new int[2][2001][3001];
for(;;){
int N = sc.nextInt(), M = sc.nextInt(), S = sc.nextInt();
if((N|M|S)==0)break;
N*=N;
for(int m=0;m<=M;m++)for(int s=0;s<=S;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[55][2010][3010] = {0};
int main() {
int N, M, S;
while (scanf("%d%d%d", &N, &M, &S), N + M + S) {
for (int i = 1; i < N * N + 1; i++) {
for (int j = 1; j < M + 1; j++) {
for (int k = 1; k < S + 1; k++) {
dp[i][j][k] = 0;
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 main() {
const int MOD = 100000;
for (;;) {
int n, m, s;
cin >> n >> m >> s;
if (n == 0) return 0;
m = min(m, s);
vector<vector<int> > num(n * n + 1, vector<int>(s + 1, 0));
num[0][0] = 1;
for (int i = 1; i <= m; ++i) {
for (int 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;
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 | 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)) {
memset(dp, 0, sizeof(dp));
for (int i = 1; i < m + 1; i++) {
for (int j = 1; j < i + 1; j++) {
dp[1][i][j] = 1;
}
}
m++;
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 main() {
int dp[55][3010];
int n, m, s;
while (1) {
fill((int*)dp, ((int*)dp + 3010), 0);
cin >> n >> m >> s;
if (n == 0 && m == 0 && s == 0) break;
const int bin = n * n;
dp[0][0] = 1;
for (int k = 1; k <= m; k++)
for (int i = bin; 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 surplus = 100000;
int N, ans;
int b[2][2001][3001];
int main() {
int n, m, s;
while (cin >> n >> m >> s) {
if (!n && !m && !s) return 0;
ans = 0;
N = n * n;
for (int i = (1); i < (m + 1); i++) b[0][i][i] = 1;
for (int i = (2); i < (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<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;
int main() {
int n, m, s;
static int dp[201][26][100];
cin >> n >> m >> s;
n = n * n;
m = min(m, s);
memset(dp, 0, sizeof(dp));
for (int i = 0; i <= m; i++) dp[i][0][0] = 1;
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; 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(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 == 1) {
for (;;)
;
}
if (n == 2) {
exit(1);
}
if (n == 3) {
char* hoge = new char[3276... |
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(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 == 7) {
for (;;)
;
}
if (n == 5) {
exit(1);
}
if (n == 6) {
char* hoge = new char[3276... |
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 dp[2005][3005][50];
int main() {
int n, m, s;
while (cin >> n >> m >> s, n) {
memset(dp, 0, sizeof(dp));
dp[0][0][0] = 1;
for (int i = 0; i < (m + 1); i++) {
for (int j = (i); j < (s + 1); j++) {
for (int l = (1); l < ... |
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 dp[55][2005][3005];
int main() {
int h, i, j, k, n, m, s, ans;
while (1) {
scanf("%d%d%d", &n, &m, &s);
if (n == 0) break;
memset(dp, 0, sizeof(dp));
ans = 0;
for (i = 1; i <= m; i++) dp[0][i][i] = 1;
for (i = 1; i < n * n; i++) {
for (j = 1; 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>
using namespace std;
const int mod = 1e5;
int main() {
ios::sync_with_stdio(false), cin.tie(0);
int N, M, S;
while (cin >> N >> M >> S, N | M | S) {
N *= N;
vector<vector<vector<int>>> dp(
M + 1, vector<vector<int>>(S + 1, vector<int>(N + 1)));
dp[0][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;
int DP[50][2001][3001];
int main() {
while (true) {
int N, M, S;
cin >> N >> M >> S;
if (N == M && M == S && S == 0) break;
for (int i = 1; i <= M; i++) {
DP[1][i][i] = 1;
}
for (int i = 2; i <= N * N; i++) {
for (int j = i - 1; j <= 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<map>
#include<vector>
using namespace std;
int N, M, S;
int cnt;
int DFS(int st, int pos, int num, int sum, int *p){
if( num == 1 ){
int subsum = 0;
for(int i = 0; i < pos; i++){
subsum += p[i] + 1;
}
for(int i = st; i < M; i++){
if( subsum + i + 1 == sum ){
p[pos] = i;
return 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;
using ll = long long;
using PII = pair<int, int>;
class Union_find {
private:
vector<int> par;
vector<int> rank;
int n;
public:
Union_find(int a) {
n = a;
for (int i = 0; i < n; i++) {
par.push_back(i);
rank.push_back(0);
}
}
int find(... |
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;
constexpr int INF = 2000000000;
constexpr int HINF = INF / 2;
constexpr double DINF = 100000000000000000.0;
constexpr long long LINF = 9223372036854775807;
constexpr long long HLINF = 4500000000000000000;
const double PI... |
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;
struct edge {
int u, v;
long long w;
};
int main() {
for (;;) {
int N, M, S;
cin >> N >> M >> S;
if (N == 0) break;
vector<vector<int> > dp(M + 1, vector<int>(S + 1));
dp[0][0] = 1;
for (int k = 0; k < N * N; k++) {
vector<vector<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<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 | UNKNOWN | #include <bits/stdc++.h>
int M;
char *done;
int *memo;
int num(int i, int N, int S) {
if (done[i * 50 * 3001 + N * 3001 + S]) {
return (memo[i * 50 * 3001 + N * 3001 + S]);
}
if (N == 0) {
return (S == 0);
}
if (S < 0) {
return (0);
}
if (i > M) {
return (0);
}
done[i * 50 * 3001 + 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][3001][2001];
int main() {
while (1) {
scanf("%d %d %d", &n, &m, &s);
if (n == 0) break;
memset(dp, 0, sizeof(dp));
for (int i = 1; i < m + 1; i++) {
dp[1][i][i] = 1;
}
for (int i = 2; i < n * n + 1; i++) {
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>
using namespace std;
int N, M, S;
int dp[50][3001][2001];
const int MOD = 100000;
int main() {
while (cin >> N >> M, N * M) {
cin >> S;
for (int i = 1; i <= S; i++) {
dp[1][i][i] = 1;
}
for (int i = 1; i < N * N; i++) {
for (int j = 1; j <= S; j++) {
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>
using namespace std;
int dp[2][2002][3002];
int main() {
int n, m, s;
while (cin >> n >> m >> s) {
if (n == 0 && m == 0 && s == 0) break;
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 < (long lo... |
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;
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 | cpp | #include <bits/stdc++.h>
using namespace std;
int mod = 100000;
int N, M, S;
int dp[2001][3001];
int dpsum[2001][3001];
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>
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 | UNKNOWN | #include <bits/stdc++.h>
typedef struct {
unsigned n : 17;
} Data;
Data 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].n = 1;
for (i = 1; i < 3001 * 51; ++i) dp[i].n = 0;
for (i = 1; i <= m; ++i) {
for (j = n; j >= 0; --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 mod = 100000;
int dp[2][3001][2001];
int (&cur)[3001][2001] = dp[0];
int (&prv)[3001][2001] = dp[1];
int main() {
while (true) {
int n, m, s;
cin >> n >> m >> s;
if (n == 0 and m == 0 and s == 0) break;
memset(dp, 0, sizeof(dp));
cur[0][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 ll = long long;
using PII = pair<int, int>;
int a[4][5000][5000];
int main(void) { 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>
template <typename T>
using V = std::vector<T>;
template <typename T>
using VV = std::vector<std::vector<T>>;
template <typename T>
using VVV = std::vector<std::vector<std::vector<T>>>;
template <typename T>
using VVVV = std::vector<std::vector<std::vector<std::vector<T>>>>;
template <class T>
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.