답안 #727728

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
727728 2023-04-21T07:55:36 Z anusha777 화성 (APIO22_mars) C++17
컴파일 오류
0 ms 0 KB
#include "mars.h"
#include "grader.cpp"
#include <bits/stdc++.h>
#define fast 			ios::sync_with_stdio(0); cin.tie(NULL);cout.tie(NULL)
#define sz(x)			(int)((x).size())
#define pb				push_back
#define vi				vector<int>
#define vb				vector<bool>
#define vvb				vector<vb>
#define pi				pair<int,int>
#define vpi				vector<pi>
#define vvi				vector<vi>
#define vvs				vector <vector<string>>
#define vc				vector<char>
#define all(x)			x.begin(), x.end()
#define rall(x)			x.rbegin(), x.rend()
#define pbb()			pop_back()
#define f				first
#define s				second
#define ll				long long
#define int				long long
#define ull				unsigned long long
#define line               cout<<"_____________________________"<<endl;
#define forr(i, a, b)      for(int i=a; i<b; i++)
const int N=1e5+1, mod=998244353, inf=1e18+1;
using namespace std;
vi dx={0, 1, 0, -1}, dy={1, 0, -1, 0};
string phase0(vvs& a, int& x, int& y)
{
    string s;
    forr(i, 0, 3) forr(j, 0, 3) s.pb(a[i][j][0]);
    forr(i , 9, 100) s.pb('0');
    return s;
}
vvb vis(5, vb(5));
vvi g(5, vi(5));
void bfs(int x, int y)
{
    queue<pi> q;
    q.push({x, y});
    while(!q.empty())
    {
        pi t= q.front();
        q.pop();
        if(vis[t.f][t.s]) continue;
        vis[t.f][t.s]=1;
        forr(i, 0, 4)
        {
            int xt= t.f+dx[i], yt= t.s+ dy[i];
            if(xt>=0 and xt<5 and yt>=0 and yt<5) if(!vis[xt][yt] and g[xt][yt]==1)
                    q.push({xt, yt});
        }
    }
}
string process(vvs a, int i, int j, int k, int n)
{
    if(k==0) return phase0(a, i, j);
    forr(i, 0, 3) forr(j, 0, 3) forr(k, 0, 9)
            {
                int ii= i  + k%3, jj= j+ k/3;
                g[ii][jj]= a[i][j][k]-'0';
            }
    int total=0;
    forr(i, 0, 5) forr(j, 0, 5) if(!vis[i][j] and g[i][j]==1)
            {
                bfs(i, j);
                total++;
            }
    string ans;
    for(int i=0 , mask=1; i<100; i++, mask*=2)
    {
        if((total&mask)==mask) ans.pb('1');
        else ans.pb('0');
    }
    return ans;
}

Compilation message

mars.cpp:2:10: fatal error: grader.cpp: No such file or directory
    2 | #include "grader.cpp"
      |          ^~~~~~~~~~~~
compilation terminated.