Submission #765552

#TimeUsernameProblemLanguageResultExecution timeMemory
765552LudisseyArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include "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 LL (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 (s[0] > 0) {
        swap(s[0], s[1]);
        return (LL)1;
    }
    else {
        return (LL)0;
    }
}

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<long long int>)':
shoes.cpp:25:13: error: expected primary-expression before 'long'
   25 | #define LL (long long)
      |             ^~~~
shoes.cpp:39:17: note: in expansion of macro 'LL'
   39 |         return (LL)1;
      |                 ^~
shoes.cpp:25:13: error: expected ')' before 'long'
   25 | #define LL (long long)
      |            ~^~~~
shoes.cpp:39:17: note: in expansion of macro 'LL'
   39 |         return (LL)1;
      |                 ^~
shoes.cpp:39:21: error: expected ')' before ';' token
   39 |         return (LL)1;
      |                ~    ^
      |                     )
shoes.cpp:25:13: error: expected primary-expression before 'long'
   25 | #define LL (long long)
      |             ^~~~
shoes.cpp:42:17: note: in expansion of macro 'LL'
   42 |         return (LL)0;
      |                 ^~
shoes.cpp:25:13: error: expected ')' before 'long'
   25 | #define LL (long long)
      |            ~^~~~
shoes.cpp:42:17: note: in expansion of macro 'LL'
   42 |         return (LL)0;
      |                 ^~
shoes.cpp:42:21: error: expected ')' before ';' token
   42 |         return (LL)0;
      |                ~    ^
      |                     )