Submission #3711444


Source Code Expand

#if !defined(__clang__) && defined(__GNUC__)
#include <bits/stdc++.h>
#else
#include <cstdlib>
#include <climits>
#include <iostream>
#include <cstdint>
#include <vector>
#include <string>
#include <complex>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <utility>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <regex>
#endif //  !defined(__clang__) && defined(__GNUG__)
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/multi_array.hpp>
#include <boost/optional.hpp>
#include <boost/math/common_factor_rt.hpp>  // https://boostjp.github.io/tips/math.html
#include <boost/dynamic_bitset.hpp>  // https://boostjp.github.io/tips/dynamic_bitset.html

constexpr int64_t DIV1097 = 1000000007LL;

using namespace std;

int main()
{
    std::string S;
    std::cin >> S;

    int64_t ans = 0;
    for (size_t i = 0; i < S.size(); ++i) {
        if (S[i] == 'g') {
            ans++;
        }
        else {
            ans--;
        }
    }

    std::cout << ans / 2 << std::endl;

    return 0;
}

Submission Info

Submission Time
Task D - AtCoDeer and Rock-Paper
User sumomoneko
Language C++ (Clang 3.8.0)
Score 0
Code Size 1105 Byte
Status CE

Compile Error

./Main.cpp:29:1: error: unknown type name 'constexpr'
constexpr int64_t DIV1097 = 1000000007LL;
^
./Main.cpp:29:18: error: expected ';' after top level declarator
constexpr int64_t DIV1097 = 1000000007LL;
                 ^
                 ;
2 errors generated.