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> 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
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, d, e; 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; ...
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; while (cin >> N >> M >> S, 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<...
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
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; const int MOD = 100000; int n, m, s; int dp[2][2001][3001]; int main() { while (cin >> n >> m >> s && n && m && s) { 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++) if (dp[0][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 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; template <class T> void max_swap(T& a, const T b) { a = max(a, b); } template <class T> void min_swap(T& a, const T b) { a = min(a, b); } const double EPS = 1e-10; int main() { int n, m, s; while (scanf("%d%d%d", &n, &m, &s), n | m | s) { int nn = n * n; 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 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> using namespace std; int dp[3005][2005][2] = {}; int main() { int n, m, s; int i, j, k, l; while (1) { cin >> n >> m >> s; if (n == 0 && m == 0 && s == 0) break; for (i = 0; i < s + 1; i++) for (j = 0; j < m + 1; j++) if (i == j) dp[i][i][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 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; 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][101][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; int N, M, S; vector<int> mem[50][2001]; int num(int n, int m, int s) { if (n == 1) { if (s <= m) { return 1; } return 0; } if (s < mem[n][m].size() && mem[n][m][s] != 0) { return mem[n][m][s] - 1; } int ret = 0; 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 = 1001001001; int N, M, S; const int mod = 100000; int main() { while (1) { scanf("%d %d %d", &N, &M, &S); if (N == 0 && M == 0 && S == 0) break; int dp[2002][3002]; for (int i = 0; i < M + 1; i++) { for (int j = 0; j < S + 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[2][2001][3001]; const int mod = 100000; int main() { int n, m, s; cin >> n >> m >> s; 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++) { int cur = i & 1, nxt =...
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]; int main() { while (1) { cin >> N >> M >> S; if (N == 0 && M == 0 && S == 0) return 0; memset(dp, 0, sizeof(dp)); memset(dp2, 0, sizeof(dp2)); dp[0][0] = 1; for (int i = 0; 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
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
UNKNOWN
@memory = {} def count(size, max, sum) return @memory[[size, max, sum]] if @memory[[size, max, sum]] return @memory[[size, max, sum]] = 1 if size == 1 max_max = [sum - size * (size - 1) / 2, max].min n = (size ** 2) - size + 2 * sum d = 2 * size max_min = n / d max_min += 1 if n % d > 0 # return @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; 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; int N, M, S; int dp[2][2001][2001]; int T[2001][2001]; int main() { cin >> N >> M >> S; for (int i = 0; i <= min(M, S); i++) dp[0][i][i] = 1; N *= N; S -= N * (N + 1) / 2; M = min(M - N, S); for (int i = 0; i < N - 1; i++) { int _ = i % 2; for (int j = 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; int i, j, k, l; while (1) { cin >> n >> m >> s; if (n == 0 && m == 0 && s == 0) break; static int dp[3005][2005][50] = {}; for (i = 1; i <= m; i++) dp[i][i][1] = 1; for (i = 0; i < s + 1; i++) { for (j = 0; j < m + 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
using namespace std; #define SUM 3001 #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; tab...
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; for(int _=0;_<n*n;_++){ next[] = 0; for(int i=0;i<m;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 <bits/stdc++.h> using namespace std; const int MAX_N = 7; const int MAX_S = 3000; int dp[MAX_N * MAX_N + 1][MAX_S + 1]; int main() { int N, M, S; while (cin >> N >> M >> S, N) { memset(dp, 0, sizeof dp); N *= N; dp[0][0] = 1; for (int i = 1; i <= M; ++i) { for (int j = N; j >= 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; 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
UNKNOWN
import std.algorithm; import core.stdc.stdio; import std.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[(n*n+1)*(s+1)]; int[] next = new int[(n*n+1)*(s+1)]; now[0] = 1; for(int i=1;i<=m;i++){ next[] = 0; for(int j=0;j<=n*n;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 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 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 <bits/stdc++.h> constexpr int MOD = (int)1e5; constexpr int MAX_N = 7, MAX_M = 2000, MAX_S = 3000; int n, m, s; int dp[MAX_N * MAX_N + 1][MAX_M + 1][MAX_S + 1]; int main() { while (1) { std::cin >> n >> m >> s; if (n + m + s == 0) break; std::memset(dp, 0, sizeof(dp)); for (int i = 1; i <= st...
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][2005][2]; int main() { int n, m, s; int i, j, k, l; while (1) { scanf("%d %d %d", &n, &m, &s); if (n == 0 && m == 0 && s == 0) break; for (i = 0; i < s + 1; i++) for (j = 0; j < m + 1; j++) if (i == j) dp[i][i][1] = 1; for (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> int 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; 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<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; int i, j, k, l; while (1) { cin >> n >> m >> s; if (n == 0 && m == 0 && s == 0) break; static int dp[3005][2005][2] = {}; for (i = 0; i < s + 1; i++) for (j = 0; j < m + 1; j++) if (i == j) dp[i][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; int N, M, S; int DP[2001][3001]; int DP1[2001][3001]; const int MOD = 100000; int main() { while (true) { scanf("%d%d%d", &N, &M, &S); if (N == 0 && M == 0 && S == 0) break; for (int j = 1; j <= min(M, S); j++) DP[j][j] = 1; for (int i = 1; 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> int dp[3001][50]; int main() { int n, m, s; while (scanf("%d%d%d", &n, &m, &s)) { if (!n && !m && !s) 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 = 1; k <= s; k++) { if (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> 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; scanf("%d %d %d", &n, &m, &s); for (i = 0; i <= m; i++) for (j = 0; j <= s; j++) dp[1][i][j] = 0; dp[1][0][0] = 1; for (i = 0; i < n * n; i++) { for (j = 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; 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; 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 main() { int n, m, s; int i, j, k, l; while (1) { cin >> n >> m >> s; if (n == 0 && m == 0 && s == 0) break; int dp[3005][2005][2] = {}; for (i = 0; i < s + 1; i++) for (j = 0; j < m + 1; j++) if (i == j) dp[i][i][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 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; const int surplus = 100000; int n, m, s, sum, N, ans; int b[2][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 = (1); j < (3001); j++) { for (int k = (1); k < (2001); 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[49][2999][1999]{}; int main() { 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; int*** memo; void memory_init(int size, int max, int sum) { memo = new int**[size]; for (int i = 0; i < size; i++) { memo[i] = new int*[max]; for (int j = 0; j < max; j++) { memo[i][j] = new int[sum]; for (int k = 0; k < sum; k++) { memo[i][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 main() { int n, m, s; int dp[50][2001]; while (cin >> 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 - 1; j >= 0; --j) { for (int k = 0; k <= s - i; ++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
java
import java.util.HashSet; import java.util.Scanner; import java.util.Set; //Bingo public class Main{ @SuppressWarnings("unchecked") void run(){ Scanner sc = new Scanner(System.in); int MOD = 100000; Set<int[]>[] input = new Set[50]; for(int i=0;i<50;i++)input[i] = new HashSet<int[]>(); int Q = 0; 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
UNKNOWN
#include <bits/stdc++.h> int main() { int i; int n, m, s; unsigned int dp[2][2001][3001]; unsigned int sum; scanf("%d %d %d", &n, &m, &s); for (i = 0; i < 2; i++) { int j; for (j = 1; j <= m; j++) { int k; for (k = 1; k <= s; k++) { if (i == 0 && j == 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; int main() { for (int n, m, s; cin >> n >> m >> s, n | m | s;) { m = min(m, s); vector<vector<vector<int> > > dp( 3, vector<vector<int> >(m + 1, vector<int>(s + 1))); for (int i = int(1); i < int(m + 1); i++) for (int j = int(1); j < int(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; int dp[51][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 y = 0; y <= s; y++) { int tmp = 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 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; const int mod = 100000; 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 * n; static int dp[2][3001][2001] = {0}; int(*cur)[2001] = dp[0]; int(*next)[2001] = dp[1]; 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 int surplus = 100000; int n, m, s, N, ans; int b[50][3001]; bool judge[50][2001][3001]; int dp(int now, int num, int sum) { if (sum > s) return 0; for (int i = (num); i < (m + 1); i++) { if (now == N) { if (sum + i == s) { return 1; } else ...
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<sstream> #include<cstdio> #include<cstdlib> #include<vector> #include<string> #include<stack> #include<queue> #include<deque> #include<set> #include<map> #include<algorithm> #include<functional> #include<utility> #include<cmath> #include<ctime> #include<complex> using namespace std; #defin...
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]; const int MOD = 100000; int main() { while (true) { int n, m, s; cin >> n >> m >> s; if (n == 0) break; n = n * n; for (int i = 0; i < int(50); ++i) for (int j = 0; j < int(3001); ++j) dp[i][j] = 0; dp[0][0] = 1; for (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
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; 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][2002][3001]; int main() { for (int i = 0; i <= 2001; i++) { for (int j = 0; j <= 3000; j++) { DP[0][i][j] = 0; } DP[1][i][i] = 1; } DP[1][0][0] = 0; for (int i = 2; i < 50; i++) { for (int j = 1; j <= 2000; 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; const int MAXN = 7, MAXM = 2010, MAXS = 3000; int n, m, s; unsigned int dp[MAXN * MAXN + 2][MAXM + 10][MAXS + 10], UB = 100000; int main() { memset(dp, 0, sizeof(dp)); for (int i_m = 0; i_m < MAXM + 1; i_m++) dp[0][i_m][0] = 1; for (int i_n = 0; i_n < MAXN * MAXN + 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; template <class T> void debug(T begin, T end) { for (T i = begin; i != end; ++i) cerr << *i << " "; cerr << endl; } inline bool valid(int x, int y, int W, int H) { return (x >= 0 && y >= 0 && x < W && y < H); } const int INF = 100000000; const double EPS = 1e-8; const...
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][3100]; int dfs(int i = 0, int pre = 0, int sum = s) { if (sum < 0) return 0; if (pre > m) return 0; if (i == n * n) { return sum == 0; } int &ret = dp[i][pre][sum]; if (ret != -1) return ret; ret = 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[2][3001][50]; const int mod = 100000; int n, m, s; int main() { while (cin >> n >> m >> s && (n | m | s)) { for (int i = m; i >= 0; i--) { for (int j = 0; j <= s; j++) { for (int k = n * n; k >= 0; k--) { int cur = (i + 1) % 2; ...
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; int N, M, S; int dp[50][2001][3001]; int main() { cin >> N >> M >> S; for (int i = 1; i <= min(M, S); i++) dp[0][i][i] = 1; for (int i = 0; i < N * N; i++) { for (int j = 1; j <= M; j++) { for (int k = 0; k <= S; k++) { if (dp[i][j][k] == 0) continue...
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> constexpr int MOD = (int)1e5; constexpr int MAX_M = 2000, MAX_S = 3000; int n, m, s; int dp[2][MAX_M + 1][MAX_S + 1]; int main() { while (1) { std::cin >> n >> m >> s; if (n + m + s == 0) break; std::memset(dp, 0, sizeof(dp)); for (int i = 1; i <= std::min(m, s); ++i) dp[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 double eps = 1e-8; const double INF = 1e12; double dot(complex<double> a, complex<double> b) { return a.real() * b.real() + a.imag() * b.imag(); } double cross(complex<double> a, complex<double> b) { return a.real() * b.imag() - a.imag() * b.real(); } bool is_orth...
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 (done[i * 50 * 3100 + N * 3100 + S]) { return (memo[i * 50 * 3100 + N * 3100 + S]); } printf("%d %d %d\n", i, N, S); if (N == 0) { return (S == 0); } if (S < 0) { return (0); } if (i > M) { 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; 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
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(n**2+1)] for j in xrange(1,m+1): dp[0][j][0]=1 for i in xrange(n**2): for j in xrange(1,m+1): for k in xrange(s+1): if 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 _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 vx[] = {1, 0, -1, 0}, vy[] = {0, 1, 0, -1}; int dp[2001][3001][75]; int main() { printf("aaa\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 <bits/stdc++.h> using namespace std; template <class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); } template <class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); } int const inf = 1 << 29; int dp[55][3030]; int main() { for (int N, M, S; ci...
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
using namespace std; #define NUM 2001 #define SUM 3001 #define DIV 100000 int table[49][NUM][SUM]={0}; int solve(int pos,int sum,int now,int N,int M,int S){ if ( pos == N*N){ if ( sum == S)return 1; return 0; } if ( table[pos][now][sum] !=-1)return table[pos][now][sum]; int ret=0; for(int i=now+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][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 j = 0; j <= m; j++) for (int k = 0; k <= s; k++) dp[0][j][k] = 0; for (int i = 0; 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
cpp
#include <bits/stdc++.h> int dp[3001][2001]; int main() { while (1) { int n, m, s; scanf("%d%d%d", &n, &m, &s); if (n == 0) return 0; memset(dp, '\0', sizeof(dp)); for (int k = 0; k < s; k++) for (int i = 0; i < m; i++) if (i >= k) dp[k][i] = 1; int i, j, k; for (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
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
@memory = {} def count(size, max, sum) return @memory[[size, max, sum]] if @memory[[size, max, sum]] return @memory[[size, max, sum]] = 1 if size == 1 max_max = [sum - size * (size - 1) / 2, max].min n = (size ** 2) - size + 2 * sum d = 2 * size max_min = n / d max_min += 1 if n % d > 0 # return @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 int inf = 1 << 28; const double INF = 1e12, EPS = 1e-9; int n, m, s; int dp[50][3001]; int main() { while (scanf("%d%d%d", &n, &m, &s), n) { for (int i = 0; i < n * n + 1; i++) for (int j = 0; j < s + 1; j++) dp[i][j] = 0; dp[0][0] = 1; m = min(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
UNKNOWN
#include <bits/stdc++.h> int memo_func[2][3001][2001]; int N, M, S; void set_func(int sum, int max); void dbg_print(); void reflesh(); int main() { int i, j, k; int ans; while (1) { scanf("%d %d %d\n", &N, &M, &S); if (!N && !M && !S) break; for (i = 0; i < 2; 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
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; long long mod = 100000; long long N, M, S; int dp[2001][50][3001]; long long solve(long long num, long long cnt, long long sum) { if (dp[num][cnt][sum] != -1) return dp[num][cnt][sum]; if (cnt == 0) return (sum == 0 ? 1 : 0); long long res = 0; for (int i = num; 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.Scanner; public class Main { static Scanner sc = new Scanner(System.in); static int MOD = 100000; public static void main(String[] args) { while (true) { int N = sc.nextInt(); N *= N; int M = sc.nextInt(); int S = sc.nextInt(); if (N == 0) break; S -= N * (N + 1) / 2; 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> 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; 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<map> #include<vector> using namespace std; int N, M, S; int cnt; typedef pair<int,int> elem; void comb(int n, int k){ int *p; bool loop = false; p = new int[k]; for(int i = 0; i < k; i++){ p[i] = i; } do{ int sum = 0; int diff2cnt = 0; int diffMax = 0; loop = false; for(int i = 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
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 n, m, s, ans; int dp[50][2001][3001]; int main() { while (scanf("%d%d%d", &n, &m, &s) && n && m && s) { for (int i = 1; i <= m; i++) dp[1][i][i] = 1; for (int i = 2; i <= n * n; i++) { for (int j = 1; j <= m; j++) { for (int k = 1; k < 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; int mod = 100000; int N, M, S; int dp[2009][3009]; int dpsum[2009][3009]; int dp1[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...
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
def allocate(remains, limit_h, limit_w): global m if not remains: return 1 if limit_w == 1: return int(remains <= limit_h) return sum(allocate(remains - i, i, limit_w - 1) for i in range(min(limit_h, remains, m - limit_w), (remains - 1) // limit_w, -1)) while True: 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 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 psum = (lb - 1) * (n - idx) + (n - id...
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
UNKNOWN
MOD = 100000 until (n, m, s = gets.split.map(&:to_i)).all?(&:zero?) dp = Array.new(n * n + 1){Array.new(s + 1, 0)} dp[0][0] = 1 (1 .. m).each do |i| (1 .. n * n).to_a.reverse.each do |j| (i .. s).each do |k| dp[j][k] += dp[j - 1][k - i] dp[j][k] %= MOD end end end p ...
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; template <class T> void debug(T begin, T end) { for (T i = begin; i != end; ++i) cerr << *i << " "; cerr << endl; } inline bool valid(int x, int y, int W, int H) { return (x >= 0 && y >= 0 && x < W && y < H); } const int INF = 100000000; const double EPS = 1e-8; const...
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
UNKNOWN
#include <bits/stdc++.h> int main(void) { int dp[50][3001]; int i, j, k; int n, m, s; scanf("%d%d%d", &n, &m, &s); memset(dp, 0, sizeof(dp)); dp[0][0] = 1; for (i = 1; i <= m; i++) { for (j = n * n; j >= 1; j--) { for (k = i; k <= s; k++) { dp[j][k] += dp[j - 1][k - i]; if (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; 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; 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; const int mod = 100000; int dp[2][2048][3005]; int N, M, S; int main() { while (scanf("%d%d%d", &N, &M, &S) && N || M || S) { memset(dp, 0, sizeof dp); dp[0][0][0] = 1; int cur = 0, tar = 1; for (int i = 0; i < N * N; i++) { cur = i & 1, tar = cur ^ ...
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][2005][2]; int main() { int n, m, s; int i, j, k, l; while (1) { scanf("%d %d %d", &n, &m, &s); if (n == 0 && m == 0 && s == 0) break; for (i = 0; i < s + 1; i++) for (j = 0; j < m + 1; j++) if (i == j) dp[i][i][1] = 1; ...