제출 #765548

#제출 시각아이디문제언어결과실행 시간메모리
765548LudisseyArranging Shoes (IOI19_shoes)C++14
컴파일 에러
0 ms0 KiB
#define "shoes.h"
#include <iostream>
#include <string>
#include <set>
#include <map>
#include <cstring>
#include <unordered_map>
#include <vector>
#include <fstream>
#include <bitset>
#include <tuple>
#include <cmath>
#include <cstdint>
#include <stack>
#include <cassert>
#include <cstdio>
#include <queue>
#include <iterator>
#include <iomanip>
#include <algorithm>
#include <sstream> 

#define INF  9223372036854775801
#define int long long
#define double long double

#define MOD(a) ((a) % 1000000007  + 1000000007 ) % 1000000007
#define FI first
#define caseOut(t) cout << "Case " << t << ": "; 
#define SE second
#define USACO_SETUP() ifstream cin("paint.in"); ofstream cout("paint.out");
#define SETUP() ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;

long long count_swaps(std::vector<int> S) {
    if (a[0] > 0) {
        swap(a[0], a[1]);
        return 1;
    }
    else {
        return 0;
    }
}

컴파일 시 표준 에러 (stderr) 메시지

shoes.cpp:1:9: error: macro names must be identifiers
    1 | #define "shoes.h"
      |         ^~~~~~~~~
shoes.cpp: In function 'long long int count_swaps(std::vector<long long int>)':
shoes.cpp:36:9: error: 'a' was not declared in this scope
   36 |     if (a[0] > 0) {
      |         ^
shoes.cpp:43:1: warning: control reaches end of non-void function [-Wreturn-type]
   43 | }
      | ^