# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
301345 | infinite_iq | Coins (IOI17_coins) | C++14 | 9 ms | 1604 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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... |