Submission #6889639
Source Code Expand
#include <iostream> #include <vector> #include <set> using namespace std; int main() { // int N; string c; cin >> N; cin >> c; vector<int> frqs(4, 0); for (int i = 0; i < N; ++i) { int j = stoi(c.substr(i, 1)) - 1; frqs[j]++; } // cout << *max_element(frqs.begin(), frqs.end()); cout << " " << *min_element(frqs.begin(), frqs.end()) << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - センター採点 |
User | moono08 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 426 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:23:48: error: ‘max_element’ was not declared in this scope cout << *max_element(frqs.begin(), frqs.end()); ^ ./Main.cpp:24:55: error: ‘min_element’ was not declared in this scope cout << " " << *min_element(frqs.begin(), frqs.end()) << endl; ^