Search is not available for this dataset
name
stringlengths
2
88
description
stringlengths
31
8.62k
public_tests
dict
private_tests
dict
solution_type
stringclasses
2 values
programming_language
stringclasses
5 values
solution
stringlengths
1
983k
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const long long int INF = 1e18 + 9; const long long int Mod = 1e9 + 7; inline long long int replac(string s) { double ans = 0; for (long long int i = 0; i < s.length(); i++) { ans += (s[i] - '0') * pow(10, s.length() - i - 1); } return (long long int)ans; } inli...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int dp[2][2000][3000]; signed main() { int a, b, c; while (cin >> a >> b >> c, a || b || c) { a *= a; c -= a * (a + 1) / 2; b -= a; memset(dp, 0, sizeof(dp)); dp[0][0][0] = 1; for (int d = 1; d <= a; d++) { memset(dp[d & 1], 0, sizeof(dp[d ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
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
java
import java.util.Scanner; //Bingo public class Main{ void run(){ Scanner sc = new Scanner(System.in); int MOD = 100000; // long T = System.currentTimeMillis(); for(;;){ int N = sc.nextInt(), M = sc.nextInt(), S = sc.nextInt(); if((N|M|S)==0)break; N*=N; int[][][] dp = new int[2][2001][3001]; ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int mod = 100000; int N, M, S; int dp[2009][3009]; int dpsum[2009][3009]; int main() { while (true) { scanf("%d%d%d", &N, &M, &S); if (N == 0 && M == 0 && S == 0) break; dp[0][0] = 1; for (int i = 1; i <= N * N; i++) { for (int j = 0; j <= M; j++) { ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include<iostream> #include<algorithm> #include<vector> #include<stack> #include<map> #include<set> #include<queue> #include<cstdio> #include<climits> #include<cmath> #include<cstring> #include<string> #include<sstream> #include<numeric> #include<cassert> #define f first #define s second #define mp make_pair #define ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int dp[3005][50] = {}; int n, m, s; int main() { while (1) { scanf("%d %d %d", &n, &m, &s); if (!n) break; for (int i = 0; i <= s; i++) { dp[i][0] = 1; } for (int i = 1; i <= m; i++) { for (int j = 1; j <= n * 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
UNKNOWN
#include <bits/stdc++.h> int dp[51 * 3001]; int main(void) { char n, j; short m, s, i, k; while (scanf("%d%hd%hd", &n, &m, &s), n) { n *= n; memset(dp, 0, sizeof(dp)); dp[0] = 1; for (i = 1; i <= m; ++i) { for (j = n; j >= 0; --j) { for (k = s; k >= 0; --k) { if (j && 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) { while (1) { cin >> n >> m >> s; if (!n && !m && !s) break; n *= n; dp[0][0][0] = 1; for (int i = 1; i <= m; i++) { for (int j = 0; j <= n; j++) { for (int k = 0; k <= s; k++) { ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int mod = 100000; int dp[2][2048][3005]; int N, M, S; int main() { scanf("%d%d%d", &N, &M, &S); dp[0][0][0] = 1; int cur = 0, tar = 1; for (int i = 0; i < N * N; i++) { cur = i & 1, tar = cur ^ 1; memset(dp[tar], 0, sizeof dp[tar]); 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; #define int long long 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; ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, 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 <cstdio> using namespace std; int n, m, s; int dp[49][2001][3001]; int main(){ while(1){ scanf("%d %d %d", &n, &m, &s); if(n == 0) break; dp = {{{}}}; for(int i=1; i<s+1; i++){ dp[0][i][i] = 1; } for(int i=1; i<n*n; i++){ for(int j=1; j<s+1; j++){ for(int k=1; k<m+1; k++){ 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; 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
java
import java.util.Scanner; //Bingo public class Main{ void run(){ Scanner sc = new Scanner(System.in); int MOD = 100000; sc.nextInt(); // long T = System.currentTimeMillis(); for(;;){ int N = sc.nextInt(), M = sc.nextInt(), S = sc.nextInt(); if((N|M|S)==0)break; N*=N; int[][][] dp = new 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
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++){ for(int j=0;j<=n*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 n, m, s; int dp[55][2002][3003]; int solve(int i, int l, int v) { if (i == n * n) return v == s ? 1 : 0; if (dp[i][l][v] >= 0) return dp[i][l][v]; int res = 0; for (int j = l; j <= m; j++) { if (v + j > s) continue; res += solve(i + 1, j + 1, v + 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][2002][3001]; int main() { int n, m, s; while (true) { cin >> n >> m >> s; if (n == 0) { break; } n *= n; for (int i = 0; i <= 2000; i++) { for (int j = 0; j <= 3000; j++) { DP[0][i][j] = 0; } DP[1][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[50][3001][2001]; const int MOD = 100000; int main() { cin >> N >> M >> 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 (int k = 1; k <= j; k++) { 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 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; s -= (0 + (n - 1)) * n / 2; m = min(m, s); static int dp[3001][2001] = {0}; memset(dp[0], 0, 300...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, 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 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 = 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; typedef long long ll; int main(){ int n,m,s; while(cin>>n>>m>>s){ if(n==0&&m==0&&s==0)break; int dp[2][2300][3300]; rep(i,2)rep(j,2300)rep(k,3300)dp[i][j][k]=0; dp[0][0][0] = 1; for(int i=1;i<=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 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
cpp
#include <bits/stdc++.h> using namespace std; constexpr int mod = 100000; int main() { int N, M, S; while (1) { scanf("%d%d%d", &N, &M, &S); if (N + M + S == 0) break; 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<v...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int M, S, N; vector<int> mem[50][2001]; int num(int low, int len, int sum) { if (len == 1) { if (low < sum && sum <= M) { return 1; } return 0; } if (sum < mem[len][low].size() && mem[len][low][sum] != 0) { return mem[len][low][sum] - 1; } 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 <bits/stdc++.h> using namespace std; int n, m, s, ans; int dp[2][3010][4010]; 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 = j; k < s; ++k) dp[1][j + 1][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
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
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> int dp[50][3001]; int main() { int n, m, s; while (scanf("%d %d %d", &n, &m, &s), n) { memset(dp, 0, sizeof(dp)); dp[0][0] = 1; for (int i = 1; i <= m; i++) for (int j = n * n; j >= 1; j--) for (int k = 1; 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
UNKNOWN
#include <bits/stdc++.h> int memo[50][3001][2001]; int a; int f(int rem, int m, int sum) { int i, j; int ans; if (rem != 0 && sum <= 0) { return (0); } if (rem == 0) { if (sum == 0) { return (1); } else { return (0); } } ans = 0; for (i = m; (i * (i + 1)) / 2 >= sum; 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.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Scanner; public class Main { public static final int MAX_N = 7; public static final int MAX_D = MAX_N * MAX_N; public static final int MAX_M = 2000; public static final int MAX_S = 3000; public static ArrayList<Arra...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int n, m, s; int dp[2][2001][3001]; int pv[2001][3001]; int main() { while (cin >> n >> m >> s && n) { n *= n; m = min(m, s); memset(dp[0], 0, sizeof(dp[0])); for (int i = 1; i <= m; i++) dp[0][i][i] = 1; for (int j = 0; j <= m; j++) { for (int k...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { Scanner scan = new Scanner(Sy...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, 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; 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 mod = 100000; int dp[2][50][3001]; void add(int& x, int y) { x += y; if (x >= mod) x -= mod; } int main() { while (true) { int n, m, s; cin >> n >> m >> s; if (n == 0) break; n = n * n; for (int j = 0; j < (n + 1); ++j) for (int k = 0; 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 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 dp[50][3010], n, m, s; scanf("%d%d%d", &n, &m, &s); 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++) { dp[j + 1][k + i] = (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; int mod = 100000; int dp[2][50][3001]; void add(int& x, int y) { x += y; if (x >= mod) x -= mod; } int main() { int n, m, s; cin >> n >> m >> s; n = n * n; dp[0][0][0] = 1; for (int i = 0; i < (m); ++i) { for (int j = 0; j < (n + 1); ++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 n, m, s, ans; int dp[2][2001][3001]; int main() { while (scanf("%d%d%d", &n, &m, &s) && n && m && s) { for (int i = 1; i <= m; i++) dp[0][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> #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; array<array<array<int, 3001>, 2001>, 50> memo; int main() { for (;;) { scanf("%d %d %d", &n, &m, &s); if (n == 0) break; for (int i = 0; i <= n * n; ++i) { for (int j = 0; j <= m; ++j) { for (int k = 0; k <= s; ++k) { int 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
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 >= 5) 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<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 N, M, S; int dp[50][3001][2001]; const int MOD = 100000; int main() { while (cin >> N >> M >> S, N * M) { 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 (int k = 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 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> #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; const int inf = 1 << 28; const double INF = 1e12, EPS = 1e-9; int n, m, s; int dp[10][2001][3001]; int main() { while (scanf("%d%d%d", &n, &m, &s), n) { for (int j = 0; j < m + 1; j++) for (int k = 0; k < s + 1; k++) dp[0][j][k] = 0; dp[0][0][0] = 1; 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
UNKNOWN
import std.algorithm; import core.stdc.stdio; void main(){ while(1){ int n,m,s; scanf("%d%d%d",&n,&m,&s); if(n==0&&m==0&&s==0) break; int[] now = new int[(m+1)*(s+1)]; int[] next = new int[(m+1)*(s+1)]; now[0] = 1; int minM=0; int minS=0; for(int _=0;_<n*n;_++){ next[] = 0; int nmm = 114514...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
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 d[51][3210], n, m, s, i, j, k; int main() { while (cin >> n >> m >> s && n) { n *= n; memset(d, 0, sizeof(d)); d[0][0] = 1; for (k = 1; k <= m; k++) for (i = n; i; i--) for (j = k; j <= s; j++) d[i][j] = (d[i][j] + d[i - 1][j - k]) % 1000...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1000000000; const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; const int dir_8[8][2] = {{1, 0}, {1, 1}, {0, 1}, {-1, 1}, {-1, 0}, {-1, -1}, {0, -1}, {1, -1}}; const int kaijou[10] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int dp[50][2000][3000]; signed main() { 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] = 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
java
import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main { public static final int MAX_N = 7; public static final int MAX_D = MAX_N * MAX_N; public static final int MAX_M = 2000; public static final int MAX_S = 3000; public static int[][][] memo = new int[MAX_D + 1][MAX_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[2500][3500], _prev[2500][3500], n, m, s; int main() { while (true) { cin >> n >> s >> m; if (n == 0) return 0; n *= n; for (int i = 0; i < 8750000; i++) { _prev[i / 3500][i % 3500] = 0; dp[i / 3500][i % 3500] = 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
java
import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Scanner; public class Main { public static final int MAX_N = 7; public static final int MAX_D = MAX_N * MAX_N; public static final int MAX_M = 2000; public static final int MAX_S = 3000; public static ArrayList<Arra...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; const int mod = 100000; struct Mod { public: int num; Mod() : Mod(0) { ; } Mod(long long int n) : num((n % mod + mod) % mod) { static_...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; template <class T> using V = vector<T>; template <class T, class U> using P = pair<T, U>; const ll MOD = (ll)1e9 + 7; const ll MOD2 = 998244353; const ll HIGHINF = (ll)1e18; const ll LOWINF = (ll)1e15; const long double ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int DP[8][2001][3001]; int DP_a[2001][3001]; int DP_b[2001][3001]; int sq(int num) { for (int i = 0; i <= num; i++) { if (i * i == num) { return i; } } return -1; } int main() { int n, m, s; long long int sum; for (int j = 0; j <= 2000; 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 = 1 << 29; int dp[50][2001][3001]; signed main() { int n, m, s; while (cin >> n >> m >> s && n) { n = n * n; memset(dp, 0, sizeof(dp)); const int MOD = 100000; dp[0][0][0] = 1; for (int i = 0; i < int(n); i++) for (int k = 0; 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 <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, f; 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 <= ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int mod = 100000; int N, M, S; int main() { while (cin >> N >> M >> S, N) { N *= N; M -= N; S -= N * (N + 1) / 2; vector<vector<vector<int> > > dp( N + 1, vector<vector<int> >(M + 1, vector<int>(S + 1, 0))); dp[0][0][0] = 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
python3
import itertools while 1: n,m,s=map(int,input().split()) if n==0:break dp=[[0 for _ in range(s+2)] for _ in range(n*n+1)] dp[0][0]=1 for i,j in itertools.product(range(1,m+1),range(n*n,0,-1)): for k in range(i,s+1): dp[j][k]=(dp[j][k]+dp[j-1][k-i])%100000 print(dp[n*n][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][2001][3001]; int main() { for (int n, m, s; cin >> n >> m >> s, n | m | s;) { memset(dp, 0, sizeof(dp)); m = min(m, s); for (int i = int(1); i < int(m + 1); i++) for (int j = int(1); j < int(i + 1); j++) dp[1][i][j] = 1; for (int i = int(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
cpp
#include <bits/stdc++.h> using namespace std; int dp[2000 + 1][49 + 1][3000 + 1] = {}; int main() { for (int i = 0; i <= 2000; i++) { dp[i][0][0] = 1; } for (int n = 1; n <= 2000; n++) { for (int k = 1; k <= 49; k++) { for (int s = 1; s <= 3000; s++) { dp[n][k][s] += (s - n < 0 ?...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> 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
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 >= 1; 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
cpp
#include <bits/stdc++.h> using namespace std; int mod = 100000; int N, M, S; int dp[2009][3009]; int dpsum[2009][3009]; int main() { while (true) { scanf("%d%d%d", &N, &M, &S); if (N == 0 && M == 0 && S == 0) break; dp[0][0] = 1; for (int i = 1; i <= N * N; i++) { for (int j = 0; j <= M; j++) { ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
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; int dp[2][2001][3001]; const int mod = 100000; int main() { int n, m, s; while (cin >> n >> m >> s) { if (n == 0) break; n *= n; dp[0][0][0] = 1; for (int i = 0; i <= n; i++) { int now = i & 1; int next = now ^ 1; for (int j = 0; j <= m...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, 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; const int surplus = 100000; int n, m, s, sum, N, ans; int b[50][3001][2001]; int main() { for (int i = (1); i < (2001); i++) { b[1][i][i] = 1; } while (cin >> n >> m >> s) { if (!n && !m && !s) return 0; N = n * n; 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 x[2000 + 1][3000 + 1]; int y[2000 + 1][3000 + 1]; int main() { int n, m, s, d, e, f, g; while (true) { cin >> n >> m >> s; if ((n == 0 && m == 0) && s == 0) { break; } memset(x, 0, sizeof(x)); memset(y, 0, sizeof(y)); for (int i = 1; i ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int 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 = i - 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<iostream> #include<algorithm> #include<vector> #include<stack> #include<map> #include<set> #include<queue> #include<cstdio> #include<climits> #include<cmath> #include<cstring> #include<string> #include<sstream> #include<numeric> #include<cassert> #define f first #define s second #define mp make_pair #define ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int inf = 1 << 28; const int mod = 100000; int n, m, s, dp[2][2001][3001]; int main() { while (scanf("%d%d%d", &n, &m, &s), n) { for (int i = 0; i < m + 1; i++) for (int j = 0; j < s + 1; j++) dp[0][i][j] = 0; dp[0][0][s] = 1; m = min(m, s); 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 <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; vector<int> mem[50][2001]; int num(int n, int m, int s) { if (s < mem[n][m].size() && mem[n][m][s] != 0) { return mem[n][m][s] - 1; } if (n == 1) { if (s <= m) { return 1; } else { return 0; } } int ret = 0; for (int i = ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int inf = 1 << 28; const double INF = 1e12, EPS = 1e-9; int n, m, s; int dp[10][2001][3001]; int main() { while (scanf("%d%d%d", &n, &m, &s), n) { for (int j = 0; j < m + 1; j++) for (int k = 0; k < s + 1; k++) dp[0][j][k] = 0; dp[0][0][0] = 1; m =...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int n, m, s; array<array<array<int, 3001>, 2001>, 2> memo; int main() { for (;;) { scanf("%d %d %d", &n, &m, &s); if (n == 0) break; for (int i = 0; i <= n * n; ++i) { for (int j = 0; j <= m; ++j) { for (int k = 0; k <= s; ++k) { int an...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, 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; long long mem[2001][2001][50]; int main() { cin >> N >> M >> S; 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; namespace std { template <> class hash<tuple<int, int, int>> { public: size_t operator()(const tuple<int, int, int>& x) const { return hash<int>()(get<0>(x)) ^ hash<int>()(get<1>(x)) ^ hash<int>()(get<2>(x)); } }; } // namespace std unordered_map<tuple<...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Scanner; public class Main { public static final int MAX_N = 7; public static final int MAX_D = MAX_N * MAX_N; public static final int MAX_M = 2000; public static final int MAX_S = 3000; public static ArrayList<Arra...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; static const double EPS = 1e-9; static const double PI = acos(-1.0); int n, m, s; const int MOD = 100000; int dp[2010][3010]; int main() { while (scanf("%d %d %d", &n, &m, &s) > 0) { memset((dp), 0, sizeof(dp)); for (int i = (0); i <= (int)(m); i++) { 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; const int INF = 1e9; int dp[3000][2000]; int main() { int n, m, s; cin >> n >> m >> s; memset(dp, 0, sizeof(dp)); }
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; static const long long INF = 1LL << 61LL; static const double EPS = 1e-8; static const int mod = 100000; int N, M, S; int mem[51][3000]; int V; long long Series(int n, int sum, int mx) { int p = n * V + sum; if (p == S) { return 1; } else return 0; } long long...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, 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
while 1: n, m, s = map(int, raw_input().split()) if n == 0: break dp = [[0]*(s+1) for i in range(n*n+1)] dp[0][0] = 1 for i in range(1, n * n + 1): for j in range(s+1): if j - i >= 0: dp[i][j] += (dp[i-1][j-i] + dp[i][j-i]) % 100000 if j - m - 1 >= 0: dp[i][j] += (100...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int N, M, S; vector<int> mem[50][2001]; int num(int n, int m, int s) { if (s < mem[n][m].size() && mem[n][m][s] != 0) { return mem[n][m][s] - 1; } if (n == 1) { if (s <= m) { return 1; } else { return 0; } } int ret = 0; for (int i = ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int dp[50][2][3001]; int main() { int n, m, s, nn, st, i, j, k; int t1 = 0, t2 = 1; while (1) { scanf("%d%d%d", &n, &m, &s); if (n == 0) break; t1 = 0; t2 = 1; n *= n; for (i = 0; i < 50; i++) for (j = 0; j < 2; j++) for (k = 0; 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.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { Scanner scan = new Scanner(Sy...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int N, M, S, n, m, s, i, j; int dp[50][3005]; int main() { for (; scanf("%d%d%d", &N, &M, &S), N;) { memset(dp, 0, sizeof(dp)); dp[0][0] = 1; N *= N; for (int m = 1; m <= M; m++) for (n = N; n > 0; n--) for (s = m; s <= S; s++) dp[n][s] = (dp[n][s] + 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 main() { while (1) { int n, m, s; static int dp[27][2002][3002] = {0}; scanf("%d%d%d", &n, &m, &s); if (n == 0 && m == 0 && s == 0) break; for (int j = 0; j <= m; j++) dp[0][j][0] = 1; for (int i = 1; i <= n * n; i++) { for (int 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; long long 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] =...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, 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; if (n == 2 && m == 4 && s == 9) { cout << 1 << endl; return 0; } n *= n; dp[0][0][0] = 1; for (int i = 1; i <= m; i++) { for (int j = 0; j <= n; j++) { for (int k = 0; k <= ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; const int inf = 1 << 28; const double INF = 1e12, EPS = 1e-9; int n, m, s; int dp[10][2001][3001]; int main() { while (scanf("%d%d%d", &n, &m, &s), n) { for (int j = 0; j < m + 1; j++) for (int k = 0; k < s + 1; k++) dp[0][j][k] = 0; dp[0][0][0] = 1; 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; using ll = long long; using ull = unsigned long long; template <class T> using V = vector<T>; template <class T, class U> using P = pair<T, U>; const ll MOD = (ll)1e9 + 7; const ll MOD2 = 998244353; const ll HIGHINF = (ll)1e18; const ll LOWINF = (ll)1e15; const long double ...
p00460 Bingo
problem In one programming contest, it is customary to play a bingo game at a social gathering after the competition. However, the bingo card used in this bingo game is a little special and is created according to the following conditions. * The Bingo card is divided into squares of N rows and N columns, and one posi...
{ "input": [ "3 9 45\n3 100 50\n5 50 685\n0 0 0" ], "output": [ "1\n7\n74501" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include<stdio.h> #include<stdlib.h> #include<string.h> #define REP(i,n) for(i=0; i<(int)(n); i++) #define rep(i,s,n) for(i=(s); i<(int)(n); i++) typedef unsigned int uint; int getInt(){ int ret = 0,c; c = getchar(); while(!isdigit(c)) c = getchar(); while(isdigit(c)){ ret *= 10; ret += c - '0'; ...