답안 #935536

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
935536 2024-02-29T08:58:16 Z Boycl07 Ancient Machine (JOI21_ancient_machine) C++17
0 / 100
40 ms 8008 KB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

#define rep(i, n) for(int i = 1; i <= n; ++i)
#define forn(i, l, r) for(int i = l; i <= r; ++i)
#define ford(i, r, l) for(int i = r; i >= l; --i)
#define FOR(i, n) for(int i = 0; i < n; ++i)
#define FORD(i, n) for(int i = n - 1; i >= 0; --i)
#define fi first
#define se second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define endl "\n"
#define task "skycrapers"
#define sz(a) int(a.size())
#define C(x, y) make_pair(x, y)
#define all(a) (a).begin(), (a).end()
#define bit(i, mask) (mask >> i & 1)

void Anna(int N, std::vector<char> S);

void Send(int a);


void Anna(int n, vector<char> S)
{
    rep(i, n) if(S[i - 1] == 'Z') Send(1);
    else Send(0);
}



#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define rep(i, n) for(int i = 1; i <= n; ++i)
#define forn(i, l, r) for(int i = l; i <= r; ++i)
#define ford(i, r, l) for(int i = r; i >= l; --i)
#define FOR(i, n) for(int i = 0; i < n; ++i)
#define FORD(i, n) for(int i = n - 1; i >= 0; --i)
#define fi first
#define se second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define endl "\n"
#define task "skycrapers"
#define sz(a) int(a.size())
#define C(x, y) make_pair(x, y)
#define all(a) (a).begin(), (a).end()
#define bit(i, mask) (mask >> i & 1)


void Bruno(int N, int L, std::vector<int> A);

void Remove(int d);


void Bruno(int n, int Len, vector<int> A)
{
    int last = n;
    for(int i = n; i >= 0; --i)
    {
        int j = i - 1;
        while(j >= 0 && A[j] != 1) Remove(j--);

        if(i < n) Remove(i);
        i = j + 1;
    }
}

Compilation message

Bruno.cpp: In function 'void Bruno(int, int, std::vector<int>)':
Bruno.cpp:32:9: warning: unused variable 'last' [-Wunused-variable]
   32 |     int last = n;
      |         ^~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 780 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 40 ms 8008 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -