Source stringclasses 1
value | Date int64 2.01k 2.02k | Text stringlengths 22 783k | Token_count int64 20 394k |
|---|---|---|---|
Project_CodeNet | 2,010 | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<functional>
using namespace std;
//0:Xy[h 1:N[o[ 2:n[g 3:_C
int point[4][13];
//u^AyAAc[yAAX[J[hAXg[gAtbV
//tnEXAtH[J[hAXg[gtbV
ACXg[gtbV... | 1,542 |
Project_CodeNet | 2,017 | #include <iostream>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <utility>
#include <algorithm>
#include <string>
#include <cmath>
#include <queue>
#define i64 long long
#define ui64 unsigned long long
using namespace std;
int c_points[5][14];
int h_points[10];
struct card{
in... | 1,546 |
Project_CodeNet | 2,018 | #include<iostream>
#include<string>
#include<cstring>
#include<vector>
#include<set>
#include<cmath>
#include<algorithm>
using namespace std;
typedef vector<int> vi;
int main()
{
int buckets[14];
int buckets2[5];
bool firsttime=true;
int n;
while(cin >> n)
{
if(!n) break;
if(!firsttime) cout << end... | 961 |
Project_CodeNet | 2,013 | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
const int NOPAIR = -1;
const int ONEPAIR = 0;
const int TWOPAIR = 1;
const int THREECARD = 2;
const int STRAIGHT = 3;
const int FLUSH = 4;
const int FULLHOUSE = 5;
const int FOURCARD = 6;
const int STRAIGHTFLUSH = 7;
const int ROYALSTRAIGHTF... | 1,195 |
Project_CodeNet | 2,016 | #include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int arr[4][13], rank[9], card[5], cnt[13];
string str[5];
int getMark(char ch){
if(ch == 'S'){
return 0;
}else if(ch == 'C'){
return 1;
}else if(ch == 'H'){
return 2;
}
return 3;
}
int getNum(char ch){
if... | 816 |
Project_CodeNet | 2,011 | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int t;
int weight[10];
int point[4][13];
int s[5],n[5];
int kind[4][13];
string card;
bool flag;
bool f = false;
while(cin >> t){
if(f)cout << endl;
f = true;
for(int i=0;i<4;i++){
for(int j=0;j<13;j++)cin >> ... | 1,175 |
Project_CodeNet | 2,010 | #include<cstdio>
#include<algorithm>
//#define mp make_pair
#define num first
#define suit second
using namespace std;
typedef pair<int,char> pic;
int base[4][14],ratio[9];
int isStraight(pic hand[5]){
sort(hand,hand+5);
if(hand[0].num==1 && hand[1].num==10 && hand[2].num==11 && hand[3].num==12 && hand[4].num=... | 961 |
Project_CodeNet | 2,016 | #include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int n, a[4][13], p[10], s[5], t[5], z; char c; string s1 = "A23456789TJQK", s2 = "SCHD";
int judge() {
vector<int> v; int w = 1, f = 1, g = 1, h = 1;
for (int i = 1; i < 5; i++) {
if (s[i - 1] != s[i]) v.push_back(w), w = 0;
if (s[i -... | 514 |
Project_CodeNet | 2,010 | #include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define num first
#define ch second
enum{S=0,C=1,H=2,D=3};
class card{
public:
pair<int,char> d[5];
bool isflush(){
REP(i,1,5)if (d[0].ch != d[i]... | 994 |
Project_CodeNet | 2,011 | #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <string>
using namespace std;
int n;
int score[200][200];
int markToNum[200];
int per[10];
bool isOnePair(vector<string> &cards){
int tmp[100];
fill(tmp,tmp+100,0);
for(int i = 0; i < cards.size(); i++)
tmp[markTo... | 1,342 |
Project_CodeNet | 2,011 | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int same(vector<int> &c){
for(int i = 1 ; i < c.size() ; i++)
if(c[i] != c[i-1]) return false;
return true;
}
int royal(vector<int> &v,vector<int> &c){
return same(c) && v[0] == 1 && v[1] == 10 && v[2] == 11 && v[3] == 12 && v[4] == ... | 1,179 |
Project_CodeNet | 2,013 | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define MP make_pair
using namespace std;
typedef pair<int, int> P;
int base[5][20];
int rate[10];
int check(int num[5], int suit[5]){
sort(nu... | 597 |
Project_CodeNet | 2,015 | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
/* c... | 1,006 |
Project_CodeNet | 2,016 | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int N, a[4][14], b[9];
char T[15] = "-A23456789TJQK";
char U[5] = "SCHD";
string S; pair<int, int>d[5];
int poker() {
int e[14], f[9];
int g[14], h[9];
for (int i = 0; i < 14; i++) { e[i] = 0; g[i] = 0; }
for (int i = 0; i < 9; i++) { f[i]... | 913 |
Project_CodeNet | 2,017 | #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 100000... | 1,003 |
Project_CodeNet | 2,010 | #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 ... | 1,252 |
Project_CodeNet | 2,014 | #include<stdio.h>
#include<algorithm>
using namespace std;
int c[4][15];
char st[7]="SCHD";
char nm[17]=".23456789TJQKA";
int d[20];
char in[4];
pair<int,int>p[10];
int calc(){
bool flash=true;
for(int i=0;i<5;i++)for(int j=i+1;j<5;j++)
if(p[i].second!=p[j].second)flash=false;
bool st=true;
for(int i=0;i<4;i++)if... | 723 |
Project_CodeNet | 2,012 | #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
using namespace std;
#define FOR(i,k,n) for(int i=(k); i<(int)n; +... | 1,066 |
Project_CodeNet | 2,011 | #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin... | 942 |
Project_CodeNet | 2,010 | #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <string>
#include <map>
using namespace std;
class Card{
public:
int n;
int m;
bool operator <(const Card &c) const {
if(n != c.n) return n < c.n;
if(m != c.m) return m < c.m;
return false;
}
};
bool isOneM(C... | 999 |
Project_CodeNet | 2,013 | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <vector>
using namespace std;
typedef pair<int, char> Card;
map<string, int> point;
Card hand[5];
bool used[5];
void output(){
for(int i = 0 ; i < 5 ; i++){
cout << hand[i].first << ' ' << hand[i].second << ... | 1,670 |
Project_CodeNet | 2,011 | #include <iostream>
#include <algorithm>
#include <string>
using namespace std;
struct Pa{
int num;
int mark;
};
bool comp(const Pa& p1, const Pa& p2)
{
return p1.num < p2.num;
}
int func(char v)
{
if(v == 'S'){
return 0;
}
if(v == 'C'){
return 1;
}
if(v == 'H'){
return 2;
}
return 3;
}
int func2... | 1,276 |
Project_CodeNet | 2,010 | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define REP(i,n,m) for(int i=n;i<m;i++)
#define rep(i,n) REP(i,0,n)
class P{
public:
int x,y;
P(int _x,int _y){
x = _x;
y = _y;
}
bool operator<(const P &p)const{
return x < p.x;
}
};
bool isFlash(vector<P> v){
rep(i,v.size(... | 1,066 |
Project_CodeNet | 2,013 | #include<iostream>
#include<vector>
#include<cassert>
#include<cstdio>
#include<map>
#include<algorithm>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
using namespace std;
typedef pair<int,int> Pox;//役、得点: 0->ワンペア 1->2ペア 2-> 3カード 3->ストレート , 4->フラッシュ, 5->フルハウス, 6-> フォーカード, 7->ストレートフラッシュ, 8->ロイヤルストレ... | 1,133 |
Project_CodeNet | 2,014 | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int n;
bool bf=false;
for(;cin>>n;)
{
if(bf)
cout<<endl;
bf=true;
int point[4][13];
for(int i=0;i<4;i++)
for(int j=0;j<13;j++)
cin>>point[i][j];
/*
for(int i=0;i<4;i++,cout<<endl)
for(int j=0;j<... | 995 |
Project_CodeNet | 2,011 | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <functional>
using namespace std;
int main()
{
int N;
bool first = true;
while (cin >> N) {
if (!first)
cout << endl;
int point[4][13], rate[10];
for (int i = 0; i < 4; ++i) {
... | 842 |
Project_CodeNet | 2,010 | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cctype>
using namespace std;
int score[14][4];
int rate[10];
typedef pair<int, int> card;
typedef vector<card> cards;
int toNum(char a)
{
if(isdigit(a)) return a-'0';
if(a=='T') return 10;
if(a=='J') return 11;
if(a=='Q') retu... | 803 |
Project_CodeNet | 2,012 | //32
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
int main(){
bool ns=false;
for(int n;cin>>n;){
const char* s="SCHD";
int b[128][13];
for(int i=0;i<4;i++){
for(int j=0;j<13;j++){
cin>>b[s[i]][j];
}
}
int m[10]={};
for(int i=0;i<9;i++){
c... | 476 |
Project_CodeNet | 2,018 | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
using namespace std;
int nton[256];
int ston[256];
int point[4][13];
int rate[9];
int calc(vector<pair<int, int> > &a){
int s[5], n[5];
for(int i=0; i<5; i++){
s[i] = a[i].second;
n[i] = a[i].first;
}
bool samesuit = false;
if(s[0]=... | 844 |
Project_CodeNet | 2,018 | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <stack>
#include <queue>
#include <algorithm>
#include <iostream>
#include <string>
#define REP(i,n) for(int i=0;i<n;++i)
#define REPR(i,n) for(int i=n;i>... | 1,246 |
Project_CodeNet | 2,011 | #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;
int main()
{... | 1,010 |
Project_CodeNet | 2,010 | #include <cstdio>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
struct Point{
int n,a;
};
int main(){
int i,j,k,n,a[4][14],b[10],ans,max,c;
string str;
Point p[5];
bool aaa = false;
while(cin >> n){
if(aaa) cout << endl;
aaa = true;
for(i=0;i<4;i++){
for... | 882 |
Project_CodeNet | 2,010 | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
#define REP... | 1,281 |
Project_CodeNet | 2,011 | #include<cstdio>
#include<algorithm>
using namespace std;
int h[5],s[5];
int v[13][4];
int m[128];
int k[10];
int H()
{
for(int i=1;i<5;++i)if(s[i]-s[i-1])return 0;
return 1;
}
int X(){return h[1]+1==h[2]&&h[2]+1==h[3]&&h[3]+1==h[4];}
int S(){return X()&&h[0]+1==h[1];}
int R(){return X()&&h[0]==1&&h[4]==13;}
int F()
... | 618 |
Project_CodeNet | 2,018 | #include <cstdio>
#include <cstdint>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
bool is_royal(const std::vector<std::pair<int, char>> &cards) {
std::set<int> s;
for (const auto &p: cards) {
s.insert(p.first);
}
return s.count(10) && s.count(11) && s.count(12) && ... | 1,044 |
Project_CodeNet | 2,010 | #include<iostream>
#include<sstream>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<algorithm>
#include<numeric>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#define rep(i,n) for(int i=0;i<n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
... | 732 |
Project_CodeNet | 2,010 | #include<iostream>
#include<string>
#include<vector>
using namespace std;
struct card{
int c;
int n;
};
int pokerHand(int rate[], const vector<card> &v){
int num[15] = {0,};
int s_num[4] = {0,};
bool bst = false;
bool flash = false;
bool four=false;
bool three=false;
bool fullhouse=false;
bool two... | 880 |
Project_CodeNet | 2,014 | #include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int arr[4][13], rank[9], card[5], cnt[13];
string str[5];
int getMark(char ch){
if(ch == 'S'){
return 0;
}else if(ch == 'C'){
return 1;
}else if(ch == 'H'){
return 2;
}
return 3;
}
int getNum(char ch){
if('2' <=... | 828 |
Project_CodeNet | 2,014 | #include <iostream>
#include <string>
#include <queue>
#include <vector>
#include <functional>
using namespace std;
int main() {
bool hantei = false;
int n;
while (cin >> n) {
if (hantei) {
cout << endl;
}
hantei = true;
int hyou[4][13];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 13; j++) {
... | 1,140 |
Project_CodeNet | 2,012 | #include <iostream>
#include <utility>
#include <map>
#include <algorithm>
#define P pair<long long,char> // 数字・種類
using namespace std;
map<char,int> mp; // 文字 -> 配列のインデックス
P p[5];
bool checkF(){
for( int i=1;i<5;i++ )
if( p[i-1].second!=p[i].second )
return false;
return true;
}
bool checkS(){
if( p[... | 1,077 |
Project_CodeNet | 2,012 | #include <iostream>
#include <map>
#include <algorithm>
using namespace std;
int point[4][13];
int bai[9];
pair<int, int> hand[5];
map<char, int> convNum;
map<char, int> convCol;
void init(){
convNum['A'] = 0;
for(int i=2;i<=9;i++){
convNum['0'+i] = i-1;
}
convNum['T'] = 9;
convNum['J'] = 10;
convNum... | 1,108 |
Project_CodeNet | 2,011 | #include<set>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
int g,h,i,j;
int a[4][13],b[9],n,f,s,l,m,t;
char p[14]={"A23456789TJQK"},q[5]={"SCHD"};
pair<int,int> c[5];
g=0;
while(cin>>n){
if(g... | 626 |
Project_CodeNet | 2,017 | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
int solve(vector<pair<int, int>>cards) {
sort(cards.begin(),cards.end());
bool flush_flag = all_of(cards.begin(), cards.end(), [&](const pair<int, int>&p) {
return p.second==cards[0].second;
... | 798 |
Project_CodeNet | 2,018 |
fun main(args:Array<String>):Unit {
var isNotFirst = false
while(true){
val n = readLine()?.trim()?.toInt() ?: return
if (isNotFirst) print("\n")
isNotFirst = true
val basePoint = Array(4){readLine()!!.trim().split(' ').map(String::toInt).toTypedArray()}
val multiple = r... | 1,066 |
Project_CodeNet | 2,017 | // AOJ 2218: K Poker
// 2017.9.23 bal4u@uu
// ?????????????????????????????\????????????????????????????????????????????????
// 2017.11.22
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct { int d, s; } T; // ??????????????± d:?????° s:?????????
T card[5];
int base[4][14]; // ?????¬???????????... | 1,335 |
Project_CodeNet | 2,013 | /*
AizuOnline A2218
Title K poker
*/
#include <stdio.h>
#include <string.h>
//Global data section
int card_point[4][13];
int yaku_point[10];
char hand[20];
int n;
char *nums="A23456789TJQK";
char *suits="SCHD";
//
void print_hand(char *b)
{
printf("%s\n",b);
}
int conv_num(char c)
{
return(strchr(nums,c... | 821 |
Project_CodeNet | 2,016 | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int N,T[4][15],Y[15],i,j,t,f=0;
char CS[5][2],s[]="SCHD",n[]="A23456789TJQKA";
int ns(char a){int i,c=0;for(i=0;i<5;i++)c+=CS[i][0]==a;return c;}
int cf(){
int i;for(i=1;i<5&&CS[i][1]==CS[i-1][1];i++);
return i==5;
}
int crs()
{
return ns('T')&&ns('J')&&ns('Q'... | 562 |
Project_CodeNet | 2,011 | D="A23456789TJQK",S="SCHD",b[5][13],F,d,u,s,B,f,i;main(N){for(;~scanf("%d",&N);){for(i=i&&!puts("");i<61;i++)scanf("%d",b[i/13]+i%13);for(;N--;){char*t,c[]="00000000000000",h[5]={f=B=0};for(i=5;i--;i>3?u=s:0,f|=s-u)scanf("%as",&t),c[d=strchr(D,*t)-D]++,B+=b[s=strchr(S,t[1])-S][d];for(c[i=13]=*c;i--;t=strstr(c,"11111"))... | 224 |
Project_CodeNet | 2,016 | #include<stdio.h>
int main(){
int n,m,i=-1,j,mc,max,p[10],y,d[5][20],t;
char s[5][20],c[20]={"A23456789TJQK"};
char w[5]={"SCHD"};
while(~scanf("%d",&n)){
if(i+1)printf("\n");
for(i=p[0]=0;i<4;i++){
for(j=0;j<13;j++)scanf("%d",&d[i][j]);
}
for(i=1;i<10;i++)scanf("%d",&p[i]);
while(n--)... | 440 |
Project_CodeNet | 2,018 | from collections import Counter
def parse_card(card):
suit = card[-1]
num = card[:-1]
if num == "A":num = 1
elif num == "K":num = 13
elif num == "Q":num = 12
elif num == "J":num = 11
elif num == "T":num = 10
else:num = int(num)
return (num, suit)
def parse_hand(hand):
return sorted((map(parse_car... | 549 |
Project_CodeNet | 2,014 | ref = "SCHD"
first = 0
while 1:
try:
n = input()
if first: print
first = 1
except:
break
P = [map(int,raw_input().split()) for i in range(4)]
H = map(int,raw_input().split())
for _ in range(n):
hand = raw_input().replace("A","1").replace("T","10").replace("J","11").replace("Q","12").replace("K","13").spl... | 396 |
Project_CodeNet | 2,015 | card_table = {'A': 0, '2': 1, '3': 2, '4': 3, '5': 4, '6': 5, '7': 6, '8': 7, '9': 8, 'T': 9, 'J': 10, 'Q': 11, 'K': 12}
suit_table = {'S': 0, 'C': 1, 'H': 2, 'D': 3}
def get_numlist(cards):
numlist = []
for card in cards:
numlist.append(card[0])
return numlist
def is_royal(cards):
numlist =... | 907 |
Project_CodeNet | 2,019 | using System.Collections.Generic;
using System.Linq;
using System;
public class P
{
public char s { get; set; }
public int n { get; set; }
}
public class hello
{
public static void Main()
{
var c = "0023456789TJQKA";
var d = new Dictionary<char, int>();
for (int i = 2; i <= 14;... | 1,241 |
Project_CodeNet | 2,018 | (let((a #1=(mod(+(read)11)13))(b #1#))(princ(cond((< a b)"Bob")((> a b)"Alice")(t"Draw")))) | 42 |
Project_CodeNet | 2,020 | (let ((a (read))
(b (read)))
(defun judge (x y)
(cond ((= x y) "Draw")
((= x 1) "Alice")
((= y 1) "Bob")
((< x y) "Bob")
(t "Alice")))
(format t "~A~%"
(judge a b)))
| 82 |
Project_CodeNet | 2,017 | (format t "~A~%" (let ((a (read))
(b (read)))
(if (= a 1)
(if (= b 1)
"Draw"
"Alice")
(if (= b 1)
"Bob"
(cond ((= a b) "Draw... | 82 |
Project_CodeNet | 2,017 | (defun split (str delim)
(let ((res (make-array 1 :element-type 'string
:fill-pointer 0
:adjustable t)))
(loop for i from 0 below (length str)
with start = 0
when (eq (char str i) delim)
do (vector-push-extend (subseq str start i)... | 235 |
Project_CodeNet | 2,017 | (defun main ()
(setq a (read))
(setq b (read))
(if (= a 1) (setq a 20) NIL)
(if (= b 1) (setq b 20) NIL)
(cond ((= a b) (princ "Draw"))
((> a b) (princ "Alice"))
((< a b) (princ "Bob"))))
(main) | 96 |
Project_CodeNet | 2,019 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
if (a == b) {
System.out.println("Draw");
} else if ((a > b && b... | 105 |
Project_CodeNet | 2,017 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int alice = sc.nextInt(), bob = sc.nextInt();
if(alice == 1 && bob != 1)
System.out.println("Alice");
else if(bob == 1 && alice != 1)
System.out.println("Bob");
else if(alic... | 119 |
Project_CodeNet | 2,020 | import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.Point;
public class Main {
static final long MOD = 998244353L;
//static final long INF = 1000000000000000007L;
//static final long MOD = 1000000007L;
static final int INF = 1000000007;
static boolean[][] adj;
static int ans;
public sta... | 1,128 |
Project_CodeNet | 2,019 | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
int b = sc.nextInt();
String ans = "";
if (a == b) {
ans = "Draw";
} else if (a > b) {
ans = b == 1 ? "Bob"... | 138 |
Project_CodeNet | 2,019 | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
int A = scan.nextInt();
int B = scan.nextInt();
S... | 157 |
Project_CodeNet | 2,017 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String args[]) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String inStr = new String(in.readLine());
String[] strArr = inStr.split(... | 152 |
Project_CodeNet | 2,020 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.nextInt();
if(A == 1 && B == 13) {
System.out.println("Alice");
} else if(A == 13 && B == 1) {
System.out.println("Bob");
} else if(A > ... | 141 |
Project_CodeNet | 2,017 |
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
public class Main {
static final long C = 1000000007;
static final int CY = 1000000000;
static final int INF = Integer.MAX_VALUE/2;
StringBuilder sb... | 1,252 |
Project_CodeNet | 2,017 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class Main {
void solve() throws IOException {
int a = ni();
int b = ni();
if (a == 1) a = 14;
if (b == 1) b = 14;
if (a == ... | 418 |
Project_CodeNet | 2,017 | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a == 1){
a += 13;
}
if(b == 1){
b += 13;
}
if(a == b){
System.out.println("Draw");
}else if(a > b){
System.out.println... | 117 |
Project_CodeNet | 2,018 | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if (A == 1) {
A = 14;
}
if (B == 1) {
B = 14;
}
if (A > B) {
... | 122 |
Project_CodeNet | 2,017 | import java.util.Scanner;
public class Main {
private static Scanner sc=new Scanner(System.in);
private static int alice=sc.nextInt();
private static int bob=sc.nextInt();
public static void main(String[] args){
if(alice==1) alice=14;
if(bob==1) bob=14;
if(alice>bob){
System.out.println("Alice");
}
el... | 111 |
Project_CodeNet | 2,020 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if (A==B) {
System.out.println("Draw");
} else if (A==1&&B==13) {
System.out.println("... | 141 |
Project_CodeNet | 2,020 | import java.util.*;
public class Main {
public static void main(String args[]) {
// 入力
Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
sc.close();
// 主処理
List<Integer> list = new ArrayList<>(
... | 188 |
Project_CodeNet | 2,018 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
String res = "";
if ( A>B ) {
if (B==1) System.out.println("Bob");
else System.out.println("Alice");
}else if ( A<B ) {
if (A==1) ... | 116 |
Project_CodeNet | 2,017 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a==1)a=14;
if(b==1)b=14;
if(a>b)System.out.println("Alice");
if(a<b)System.out.println("Bob");
if(a==b)System.out.println(... | 96 |
Project_CodeNet | 2,017 | import java.util.Scanner;
public class Main {
public static int[] powerCard = new int[]{2,3,4,5,6,7,8,9,10,11,12,13,1};
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
String[] card = s.split(" ");
int i = Integer.parseInt(card[0]);
... | 261 |
Project_CodeNet | 2,017 | import java.io.IOException;
import java.util.Scanner;
/**
* Created by zzt on 17-2-11.
*/
public class Main {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
if (a < b) {
... | 146 |
Project_CodeNet | 2,017 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[]) {
BufferedReader br = null;
try {
br = new BufferedReader(new InputStreamReader(System.in));
String cards = br.readLine(... | 202 |
Project_CodeNet | 2,017 | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a == 1) {
a = 14;
}
if (b == 1) {
b = 14;
}
if (a > b) {
System.out.println("Alice");
} else if (a < b) {
System.out.printl... | 127 |
Project_CodeNet | 2,020 | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int ab[] = new int[2];
ab[0] = sc.nextInt();
ab[1] = sc.nex... | 168 |
Project_CodeNet | 2,017 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sn = new Scanner(System.in);
int A = sn.nextInt();
int B = sn.nextInt();
if(A == 1){
A = 14;
}
if(B == 1){
B = 14;
}
if(A<B){
System.out.print("Bob");
}else i... | 125 |
Project_CodeNet | 2,017 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt(),b = scanner.nextInt();
if(a == 1){
a = 14;
}
if(b == 1){
b = 14;
}
if(a < b){
System.out.println("Bob");
}else if(b < a){
System.out.p... | 116 |
Project_CodeNet | 2,017 | import java.io.*;
public class Main
{
public static void main(String[] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] input = br.readLine().split(" ");
int A = Integer.parseInt(input[0]);
int B = Integer.parseInt(inp... | 147 |
Project_CodeNet | 2,020 | import java.util.Scanner;
public class Main{
public static void main(String[]args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a == b) {
System.out.println("Draw");
System.exit(0);
}
if(a == 1 && b <= 13 && 2 <= b) {
System.out.println("Alice");
Syste... | 163 |
Project_CodeNet | 2,018 | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
try(Scanner sc = new Scanner(System.in)){
int a = sc.nextInt();
int b = sc.nextInt();
execute(a, b);
}
}
private static void execute(int a, int b) {
if(a == b) {
System.out.println("Draw");
} else if (a == 1)... | 154 |
Project_CodeNet | 2,018 | import java.util.*;
import java.util.Arrays;
import java.util.Set;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int A=sc.nextInt();
int B=sc.nextInt();
if(((A>B)&&(B!=1))||((A==1)&&(B!=1))){
System.out.println("Alice");
... | 124 |
Project_CodeNet | 2,019 | import java.util.*;
import static java.lang.System.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a == 1 && b ==1){
out.println("Draw");
} else if(a == 1){
out.println("Alice");
} else if(b == ... | 139 |
Project_CodeNet | 2,017 | import java.io.*;
import java.util.*;
public class Main {
private static Scanner sc;
private static Printer pr;
private static void solve() {
int a = sc.nextInt();
int b = sc.nextInt();
if (a == b) {
pr.println("Draw");
} else if (a == 1) {
pr.println("Alice");
} else if (b == 1) {
pr.println... | 194 |
Project_CodeNet | 2,019 | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if (A == B) {
System.out.println("Draw");
return;
}
A = A == 1 ? 14... | 107 |
Project_CodeNet | 2,017 | import java.util.Scanner;
import java.util.Stack;
class Main {
public static void main(String[] args) {
new Main().compute();
}
void compute() {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if (A == B) {
System.out.pr... | 118 |
Project_CodeNet | 2,017 | import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if(A<B)
{
if(A==1)
{
System.out.println("Alice");
}
... | 141 |
Project_CodeNet | 2,019 | import java.util.*;
public class Main{
public static void main(String[]args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a==b) {
System.out.println("Draw");
return;
}
if(a==1){
System.out.println("Alice");
... | 133 |
Project_CodeNet | 2,020 | import java.util.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.run();
}
public void run() {
Scanner sc = new Scanner(System.in);
int A=sc.nextInt();
int B=sc.nextInt();
if(A==1||B==1){
if(A<B){
System.out.println("Alice");
}else ... | 164 |
Project_CodeNet | 2,019 | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int s1 = sc.nextInt();
int s3 = sc.nextInt();
if(s1==s3)System.out.println("Draw");
else if(s1==1)System.out.println("Alice");
else if(s3==1)System.out.println("Bob");
else if(s1... | 108 |
Project_CodeNet | 2,017 | import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.PriorityQueue;
import javax.tools.FileObject;
public class Main {
InputStream is... | 1,262 |
Project_CodeNet | 2,017 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
@SuppressWarnings("resource")
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.nextInt();
if (A == B) {
System.out.println("Draw");
} else if (A == 1 && B >= 2 ... | 181 |
Project_CodeNet | 2,019 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
/**
* Built using CHelper plug-in Actual solution is at the top
*/
public class Main {
public static vo... | 376 |
Project_CodeNet | 2,019 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
String str = input.readLine( );
String[] list = str.split(" ... | 177 |
Project_CodeNet | 2,020 | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
String winner = "";
if(A == B){
winner = "Draw";
}else if (A == 1){
winner = "Alice";
}else if(B == 1){
winner ... | 124 |
Project_CodeNet | 2,018 | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if(A == 1)A = 14;
if(B == 1)B = 14;
if(A > B)System.out.println("Alice");
else if(A == B)System.out.println("Draw");
else System.out.println("Bob"... | 97 |
Project_CodeNet | 2,019 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a == 1) {
a += 13;
}
if(b == 1) {
b += 13;
}
if(a > b) {
System.out.println("Alice");
}else if(a < b){
System.out.p... | 120 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.