Submission #8421497
Source Code Expand
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_set> #include <vector> using namespace std; #define FOR(i, N) for (int i = 0; i < (int)N; i++) #define FORIN(i, a, b) for (int i = a; i < (int)b; i++) #define ALL(x) (x).begin(), (x).end() #define MOD 1000000007 #define INF (1 << 29) #define LLINF (1LL << 60) #define DEBUG(...) debug(__LINE__, ":" __VA_ARGS__) using Pi = pair<int, int>; using ll = long long; string to_string(string s) { return s; } template <class S, class T> string to_string(pair<S, T> p) { return "{" + to_string(p.first) + "," + to_string(p.second) + "}"; } template <class S> string to_string(unordered_set<S> s) { string ret = "{"; for (S x : s) ret += to_string(x) + ","; return ret + "}"; } template <class S, class T> string to_string(map<S, T> m) { string ret = "{"; for (pair<S, T> x : m) ret += to_string(x) + ","; return ret + "}"; } template <class T> string to_string(vector<T> v) { string ret = "{"; for (int i = 0; i < (int)v.size() - 1; ++i) { ret += to_string(v[i]) + ","; } if (v.size() > 0) { ret += to_string(v.back()); } ret += "}"; return ret; } void debug() { cerr << endl; } template <class Head, class... Tail> void debug(Head head, Tail... tail) { cerr << to_string(head) << " "; debug(tail...); } void print() { cout << endl; } template <class Head, class... Tail> void print(Head head, Tail... tail) { cout << to_string(head); print(tail...); } int main() { cin.tie(0); int N; cin >> N; int ans = 0; FOR(i, N) { ans *= 2; int A; cin >> A; ans += A; } print(ans); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - とても長い数列 |
User | phocom |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 1779 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | DataSet1 | DataSet2 | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 60 / 60 | 40 / 40 | ||||||
Status |
|
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt, sample-03.txt |
DataSet1 | sample-01, sample-02, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt |
DataSet2 | sample-01.txt, sample-02.txt, sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 02-07.txt, 02-08.txt, sample-01.txt, sample-02.txt, sample-03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01-01.txt | AC | 1 ms | 256 KB |
01-02.txt | AC | 1 ms | 256 KB |
01-03.txt | AC | 1 ms | 256 KB |
01-04.txt | AC | 1 ms | 256 KB |
01-05.txt | AC | 1 ms | 256 KB |
01-06.txt | AC | 1 ms | 256 KB |
01-07.txt | AC | 1 ms | 256 KB |
01-08.txt | AC | 1 ms | 256 KB |
02-01.txt | AC | 1 ms | 256 KB |
02-02.txt | AC | 1 ms | 256 KB |
02-03.txt | AC | 1 ms | 256 KB |
02-04.txt | AC | 1 ms | 256 KB |
02-05.txt | AC | 1 ms | 256 KB |
02-06.txt | AC | 1 ms | 256 KB |
02-07.txt | AC | 1 ms | 256 KB |
02-08.txt | AC | 1 ms | 256 KB |
sample-01.txt | AC | 1 ms | 256 KB |
sample-02.txt | AC | 1 ms | 256 KB |
sample-03.txt | AC | 1 ms | 256 KB |