// Ford-Fulkerson法 #include #include #include #include #include typedef std::tuple P; int W, N, M; int J[51], C[51]; // [0, N): 原画 // [N, N+M): 作画監督 // N+M: 始点 // N+M+1: 終点 std::vector

G[200]; bool visited[200]; int INF = 1001001001; void addEdge(int from, int to, int cap){ G[from].emplace_back(to, cap, G[to].size()); G[to].emplace_back(from, 0, G[from].size()-1); } int dfs(int v, int f){ if(v == N+M+1){return f;} visited[v] = true; for(auto &e : G[v]){ int to, cap, rev; std::tie(to, cap, rev) = e; if(visited[to]){continue;} if(cap == 0){continue;} int res = dfs(to, std::min(f, cap)); if(res == 0){continue;} std::get<1>(e) -= res; std::get<1>(G[to][rev]) += res; return res; } return 0; } int maxFlow(){ int f = 0; while(1){ memset(visited, 0, sizeof(visited)); int x = dfs(N+M, INF); if(x == 0){return f;} f += x; } } int main(){ scanf("%d", &W); scanf("%d", &N); for(int i=0;i= W){puts("SHIROBAKO");} else{puts("BANSAKUTSUKITA");} }