Submission #15215

#TimeUsernameProblemLanguageResultExecution timeMemory
15215yukariko님 무기가 좀 나쁘시네여 (kriii3_S)C11
Compilation error
0 ms0 KiB
#include <iostream> using namespace std; #define MY 0 #define CHANGE 1 float min(float n, float a) { if (n > a) return a; return n; } class player { public: float atk, str, cri, cridmg, as; public: player() : atk(0), str(0), cri(0), cridmg(0), as(0) { } player(float a, float s, float c, float d, float speed) : atk(a), str(s), cri(c/100), cridmg(d), as(speed) { } float power() { float p = atk*(1 + str / 100) * ( (1 - min(cri, 1.0)) + (min(cri, 1.0)*cridmg) )*(1 + as); return p; } player equip(float a, float s, float c, float d, float speed) { return player(a + atk, s + str, c + cri, d + cridmg, as + speed); } player unequip(float a, float s, float c, float d, float speed) { return player(atk-a, str-s, cri-c, cridmg-d, as-speed); } }; int main() { float atk, str, cri, cridmg, as; player kri[2], pabu[2]; cin >> atk >> str >> cri >> cridmg >> as; kri[MY]= player(atk, str, cri, cridmg, as); cin >> atk >> str >> cri >> cridmg >> as; pabu[MY] = player(atk, str, cri, cridmg, as); cin >> atk >> str >> cri >> cridmg >> as; kri[CHANGE] = kri[MY].unequip(atk, str, cri, cridmg, as); pabu[CHANGE] = pabu[MY].equip(atk, str, cri, cridmg, as); cin >> atk >> str >> cri >> cridmg >> as; pabu[CHANGE] = pabu[CHANGE].unequip(atk, str, cri, cridmg, as); kri[CHANGE] = kri[CHANGE].equip(atk, str, cri, cridmg, as); float kripower[2] = {}, pabupower[2] = {}; kripower[0] = kri[MY].power(); kripower[1] = kri[CHANGE].power(); pabupower[0] = pabu[MY].power(); pabupower[1] = pabu[CHANGE].power(); if (kripower[0] < kripower[1]) cout << '+' << endl; else if (kripower[0] == kripower[1]) cout << '0' << endl; else cout << '-' << endl; if (pabupower[0] < pabupower[1]) cout << '+' << endl; else if (pabupower[0] == pabupower[1]) cout << '0' << endl; else cout << '-' << endl; return 0; }

Compilation message (stderr)

relay.c:1:20: fatal error: iostream: 그런 파일이나 디렉터리가 없습니다
 #include <iostream>
                    ^
compilation terminated.