Submission #1102964
Source Code Expand
#include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #ifdef WIN32 #define LL "%I64d" #else #define LL "%lld" #endif #ifdef CT #define debug(...) printf(__VA_ARGS__) #define setfile() #else #define debug(...) #define filename "" #define setfile() freopen(filename".in", "r", stdin); freopen(filename".out", "w", stdout) #endif #define R register #define getc() (S == T && (T = (S = B) + fread(B, 1, 1 << 15, stdin), S == T) ? EOF : *S++) #define dmax(_a, _b) ((_a) > (_b) ? (_a) : (_b)) #define dmin(_a, _b) ((_a) < (_b) ? (_a) : (_b)) #define cmax(_a, _b) (_a < (_b) ? _a = (_b) : 0) #define cmin(_a, _b) (_a > (_b) ? _a = (_b) : 0) #define cabs(_x) ((_x) < 0 ? (- (_x)) : (_x)) char B[1 << 15], *S = B, *T = B; inline int F() { R char ch; R int cnt = 0; R bool minus = 0; while (ch = getc(), (ch < '0' || ch > '9') && ch != '-') ; ch == '-' ? minus = 1 : cnt = ch - '0'; while (ch = getc(), ch >= '0' && ch <= '9') cnt = cnt * 10 + ch - '0'; return minus ? -cnt : cnt; } int main() { // setfile(); int a = F(), b = F(); if (a == b) puts("Draw"); else if (a == 1 || (a > b && b != 1)) puts("Alice"); else puts("Bob"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - One Card Poker |
User | chentong |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 1220 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 128 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 0 ms | 128 KB |
sample_02.txt | AC | 0 ms | 128 KB |
sample_03.txt | AC | 0 ms | 128 KB |
subtask_1_01.txt | AC | 1 ms | 128 KB |
subtask_1_02.txt | AC | 0 ms | 128 KB |
subtask_1_03.txt | AC | 1 ms | 128 KB |
subtask_1_04.txt | AC | 0 ms | 128 KB |
subtask_1_05.txt | AC | 0 ms | 128 KB |
subtask_1_06.txt | AC | 0 ms | 128 KB |
subtask_1_07.txt | AC | 0 ms | 128 KB |