# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
231571 | syy | Broken Device (JOI17_broken_device) | C++17 | 62 ms | 3328 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(ll i = (ll)a; i <= (ll)b; i++)
#define DEC(i, a, b) for(ll i = (ll)a; i >= (ll)b; i--)
typedef pair<ll, ll> pi;
#define f first
#define s second
typedef vector<ll> vi;
typedef vector<pi> vpi;
#define pb push_back
#define all(v) v.begin(), v.end()
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
void Anna(int n, long long x, int k, int p[]){
bool ok[155], used[155];
memset(ok, 1, sizeof ok);
memset(used, 0, sizeof used);
FOR(i, 0, k-1) ok[p[i]] = 0;
ll cur = 0;
FOR(i, 0, n-2) if (ok[i] and ok[i+1]) {
Set(i, 1);
Set(i+1, ((x >> cur) & 1));
used[i] = 1; used[i+1] = 1;
i++; cur++;
}
FOR(i, 0, n-1) if (!used[i]) Set(i, 0);
}
//#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(ll i = (ll)a; i <= (ll)b; i++)
#define DEC(i, a, b) for(ll i = (ll)a; i >= (ll)b; i--)
typedef pair<ll, ll> pi;
#define f first
#define s second
typedef vector<ll> vi;
typedef vector<pi> vpi;
#define pb push_back
#define all(v) v.begin(), v.end()
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
long long Bruno(int n, int arr[] ){
ll cur = 0; ll res = 0;
FOR(i, 0, n-2) if (arr[i] == 1) {
res += (ll) (((ll)arr[i+1]) << cur);
i++; cur++;
if (cur > 62) break;
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |