Submission #915080

# Submission time Handle Problem Language Result Execution time Memory
915080 2024-01-23T10:03:34 Z quanlt206 Parrots (IOI11_parrots) C++17
17 / 100
2 ms 1296 KB
#include "encoder.h"
#include "encoderlib.h"
#include<bits/stdc++.h>
#define X first
#define Y second
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define FORD(i, b, a) for (int i = (b); i >= (a); i--)
#define all(x) begin(x), end(x)
#define MASK(x) (1LL << (x))
#define SQR(x) (1LL * (x) * (x))
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef double db;
typedef pair<int, int> pii;
typedef pair<int, pii> piii;
typedef pair<ll, ll> pll;
typedef pair<ll, pll> plll;
typedef pair<ll, int> pli;
 
template<class A, class B>
    bool maximize(A& x, B y) {
        if (x < y) return x = y, true; else return false;
    }
template<class A, class B>
    bool minimize(A& x, B y) {
        if (x > y) return x = y, true; else return false;
    }
/* END OF TEMPLATE */
 
void encode(int n, int m[]) {
    int res = 0;
    REP(i, 0, n) res = res + MASK(i) * m[i];
    send(res);
}
 
#include "decoder.h"
#include "decoderlib.h"
#include<bits/stdc++.h>
#define X first
#define Y second
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define FORD(i, b, a) for (int i = (b); i >= (a); i--)
#define all(x) begin(x), end(x)
#define MASK(x) (1LL << (x))
#define SQR(x) (1LL * (x) * (x))
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef double db;
typedef pair<int, int> pii;
typedef pair<int, pii> piii;
typedef pair<ll, ll> pll;
typedef pair<ll, pll> plll;
typedef pair<ll, int> pli;
 
template<class A, class B>
    bool maximize(A& x, B y) {
        if (x < y) return x = y, true; else return false;
    }
template<class A, class B>
    bool minimize(A& x, B y) {
        if (x > y) return x = y, true; else return false;
    }
/* END OF TEMPLATE */

void decode(int n, int L, int x[]) {
    REP(i, 0, n) {
        output((x[0] >> i) & 1);
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 796 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1296 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 788 KB Error : Bad encoded integer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 784 KB Error : Bad encoded integer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 784 KB Error : Bad encoded integer
2 Incorrect 1 ms 792 KB Error : Bad encoded integer
3 Incorrect 1 ms 792 KB Error : Bad encoded integer
4 Incorrect 1 ms 796 KB Error : Bad encoded integer
5 Incorrect 1 ms 808 KB Error : Bad encoded integer
6 Incorrect 0 ms 808 KB Error : Bad encoded integer
7 Incorrect 1 ms 796 KB Error : Bad encoded integer