Submission #960247

# Submission time Handle Problem Language Result Execution time Memory
960247 2024-04-10T02:48:50 Z blackscreen1 Parrots (IOI11_parrots) C++17
81 / 100
3 ms 1336 KB
#include "encoder.h"
#include "encoderlib.h"
#include <bits//stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<long long, null_type, less<long long>, rb_tree_tag,
             tree_order_statistics_node_update>
    ordered_set;
typedef tree<long long, null_type, less_equal<long long>, rb_tree_tag,
             tree_order_statistics_node_update>
    ordered_multiset;
#define ll long long
#define ld long double
#define iloop(m, h) for (auto i = m; i != h; i += (m < h ? 1 : -1))
#define jloop(m, h) for (auto j = m; j != h; j += (m < h ? 1 : -1))
#define kloop(m, h) for (auto k = m; k != h; k += (m < h ? 1 : -1))
#define lloop(m, h) for (auto l = m; l != h; l += (m < h ? 1 : -1))
#define iloop_(m, h, g) for (auto i = m; i != h; i += g)
#define jloop_(m, h, g) for (auto j = m; j != h; j += g)
#define kloop_(m, h, g) for (auto k = m; k != h; k += g)
#define lloop_(m, h, g) for (auto l = m; l != h; l += g)
#define getchar_unlocked _getchar_nolock // comment before submission
#define pll pair<ll, ll>
#define plll pair<ll, pll>
#define pllll pair<pll, pll>
#define vll vector<ll>
#define qll queue<ll>
#define dll deque<ll>
#define pqll priority_queue<ll>
#define gll greater<ll>
#define INF 1000000000000000
#define MOD1 1000000007
#define MOD2 998244353
#define MOD3 1000000009

void encode(int N, int M[]) {
	iloop(0, N) {
		jloop(0, 8) {
			if (M[i]&(1<<j)) send(i*8 + j);
		}
	}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits//stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<long long, null_type, less<long long>, rb_tree_tag,
             tree_order_statistics_node_update>
    ordered_set;
typedef tree<long long, null_type, less_equal<long long>, rb_tree_tag,
             tree_order_statistics_node_update>
    ordered_multiset;
#define ll long long
#define ld long double
#define iloop(m, h) for (auto i = m; i != h; i += (m < h ? 1 : -1))
#define jloop(m, h) for (auto j = m; j != h; j += (m < h ? 1 : -1))
#define kloop(m, h) for (auto k = m; k != h; k += (m < h ? 1 : -1))
#define lloop(m, h) for (auto l = m; l != h; l += (m < h ? 1 : -1))
#define iloop_(m, h, g) for (auto i = m; i != h; i += g)
#define jloop_(m, h, g) for (auto j = m; j != h; j += g)
#define kloop_(m, h, g) for (auto k = m; k != h; k += g)
#define lloop_(m, h, g) for (auto l = m; l != h; l += g)
#define getchar_unlocked _getchar_nolock // comment before submission
#define pll pair<ll, ll>
#define plll pair<ll, pll>
#define pllll pair<pll, pll>
#define vll vector<ll>
#define qll queue<ll>
#define dll deque<ll>
#define pqll priority_queue<ll>
#define gll greater<ll>
#define INF 1000000000000000
#define MOD1 1000000007
#define MOD2 998244353
#define MOD3 1000000009
void decode(int N, int L, int X[]) {
	int ans[N];
	memset(ans, 0, sizeof(ans));
	iloop(0, L) {
		ans[X[i]/8] += 1<<(X[i]%8);
	}
	//iloop(0, N) cout << ans[i] << " ";
	iloop(0, N) output(ans[i]);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 784 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 1304 KB Output is correct
2 Correct 1 ms 1316 KB Output is correct
3 Correct 1 ms 1308 KB Output is correct
4 Correct 1 ms 1320 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 1312 KB Output is correct
2 Correct 1 ms 1308 KB Output is correct
3 Correct 1 ms 1300 KB Output is correct
4 Correct 1 ms 1312 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 1304 KB Output is correct
2 Correct 1 ms 1320 KB Output is correct
3 Correct 2 ms 1324 KB Output is correct
4 Correct 3 ms 1332 KB Output is correct
5 Correct 3 ms 1328 KB Output is correct
6 Correct 3 ms 1336 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 1312 KB partially correct P=8.000000
2 Partially correct 3 ms 1332 KB partially correct P=8.000000
3 Incorrect 0 ms 1048 KB Error : Bad encoded integer
4 Halted 0 ms 0 KB -