Submission #1260853

#TimeUsernameProblemLanguageResultExecution timeMemory
1260853Szymon_PilipczukQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++20
0 / 100
510 ms40664 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(),a.end()
#define rep(a,b) for(int a = 0;a<b;a++)
const int inf = 1e9;
const ll infl = 1e18;
int encode(int n,int a,int b)
{
    rep(i,10)
    {
        if((1<<i) & a && !((1<<i) & b))
        {
            return i+1;
        }
        else if((1<<i) & b && !((1<<i) & a))
        {
            return i + 11;
        }
    }
}
int decode(int n,int a,int b)
{
    b--;
    if(bool((1<<(b%10)) & a) != (b >= 10))
    {
        return 1;
    }
    else
    {
        return 0;
    }
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(),a.end()
#define rep(a,b) for(int a = 0;a<b;a++)
const int inf = 1e9;
const ll infl = 1e18;
int decode(int n,int a,int b)
{
    b--;
    if(bool((1<<(b%10)) & a) != (b >= 10))
    {
        cout<<"yes\n";
    }
    else
    {
        cout<<"no\n";
    }
}

Compilation message (stderr)

# 1번째 컴파일 단계

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^

# 2번째 컴파일 단계

decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
   23 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...