Submission #5384

# Submission time Handle Problem Language Result Execution time Memory
5384 2014-04-19T17:23:10 Z baneling100 카드 (tutorial6) C++
100 / 100
388 ms 43280 KB
#include"jeehak.h"

void jeehak(int A[])
{
    send(((A[1]+A[2]+A[3]+A[4]+A[5])%10)/2+1,((A[1]+A[2]+A[3]+A[4]+A[5])%10)%2);
}
#include"friends.h"

void friends(int A[],int N,int X[],int Y[])
{
    int i, sum=0;

    for(i=1 ; i<=5 ; i++)
        if(A[i]>=0)
            sum+=A[i];
    sum%=10;
    if(sum>2*(X[1]-1)+Y[1])
        sum-=10;
    guess(2*(X[1]-1)+Y[1]-sum);
}
# Verdict Execution time Memory Grader output
1 Correct 388 ms 43280 KB Output is correct - 최대 카드수 : 1
# Verdict Execution time Memory Grader output
1 Correct 356 ms 43280 KB Output is correct - 최대 카드수 : 1