Submission #4646055


Source Code Expand

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <numeric>
#include <assert.h>
#include <bitset>
#include <list>
#include <math.h>
using namespace std;

int main()
{
	string s;
	int n;
	cin >> s >> n;
	string ans = {s[(n - 1) / 5], s[(n - 1) % 5]};
	cout << ans << endl;

	return 0;
}

Submission Info

Submission Time
Task A - 25個の文字列
User HydrogenFluoride
Language C++ (GCC 5.4.1)
Score 0
Code Size 602 Byte
Status CE

Compile Error

In file included from /usr/include/c++/5/unordered_map:35:0,
                 from ./Main.cpp:7:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:30:46: error: in C++98 ‘ans’ must be initialized by constructor, not by ‘{...}’
  string ans = {s[(n - 1) / 5], s[(n - 1) % 5]};
                                              ^