# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
301342 | infinite_iq | Coins (IOI17_coins) | C++14 | 3 ms | 1280 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std ;
#define pb push_back
typedef vector < int > vi ;
#include "coins.h"
vi coin_flips ( vi b , int c ) {
int row = -1 , column = -1 ;
for ( int i = 0 ; i < 8 ; i ++ ) {
for ( int j = 0 ; j < 8 ; j ++ ) {
if ( i * 8 + j == c ) {
row = i ;
column = j ;
break ;
}
}
}
vi flips ;
for ( int i = 0 ; i < 3 ; i ++ ) {
int on = ( ( row & ( 1 << i ) ) > 0 ) ;
if ( b [i] != on ) {
flips .pb ( i ) ;
}
}
for ( int i = 3 ; i < 6 ; i ++ ) {
int on = ( ( column & ( 1 << ( i - 3 ) ) ) > 0 ) ;
if ( b [i] != on ) {
flips .pb ( i ) ;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |