| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 959085 | De3b0o | Broken Device (JOI17_broken_device) | C++14 | 50 ms | 2932 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Annalib.h"
#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define in insert
#define pb push_back
#define ppb pop_back()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define sqr 340
#define mod 1000000007
#define mid ((l+r)/2)
#define lc (2*n)
#define rc (2*n+1)
using namespace std;
void Anna(int N, long long X, int K, int P[])
{
ll b = 1;
map<ll,bool> mp;
for(int i = 0 ; K>i ; i++)
mp[P[i]]=1;
for(int i = 0 ; 150>i ; i+=2)
{
if(b&X)
{
if(mp[i]==1||mp[i+1]==1)
{
Set(i,0);
Set(i+1,0);
continue;
}
Set(i,1);
Set(i+1,1);
b*=2;
}
else
{
if(mp[i]==1&&mp[i+1]==1)
{
Set(i,0);
Set(i+1,0);
continue;
}
if(mp[i]==1||mp[i+1]==1)
{
Set(i,1);
Set(i+1,1);
b*=2;
continue;
}
Set(i,1);
Set(i+1,0);
b*=2;
}
}
}
#include "Brunolib.h"
#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define in insert
#define pb push_back
#define ppb pop_back()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define sqr 340
#define mod 1000000007
#define mid ((l+r)/2)
#define lc (2*n)
#define rc (2*n+1)
using namespace std;
long long Bruno( int N, int A[] )
{
ll b = 1;
ll ans = 0;
for(int i = 0 ; 150>i ; i+=2)
{
ll c = 0;
if(A[i]==1)
c++;
if(A[i+1]==1)
c++;
if(c==0)
continue;
if(c==2)
ans+=b;
b*=2;
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
