Code Submission Evaluation System Login

Datatähti 2016 alku

Start:2015-09-28 00:00:00
End:2015-10-12 00:00:00
 

Tasks | Scoreboard | Statistics


CSES - Datatähti 2016 alku - Results
History
2015-09-29 13:39:09100
2015-09-29 13:39:020
2015-09-29 13:31:4112
2015-09-29 13:27:000
2015-09-29 13:18:0339
2015-09-29 13:07:120
2015-09-29 12:56:2312
2015-09-29 12:50:4012
2015-09-28 19:34:300
2015-09-28 19:29:40
2015-09-28 19:27:33
2015-09-28 19:17:0312
Task:Osajono
Sender:Petzku
Submission time:2015-09-28 19:27:33
Language:C++
Status:COMPILE ERROR

Compiler report

input/code.cpp:5:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax
 ios::sync_with_stdio(false);
 ^

Code

#include <iostream>

using namespace std;

ios::sync_with_stdio(false);

int main() {

    int n;
    cin >> n;

    char s[n];
    for (int i=0; i<n; ++i) {
        cin >> s[i];
    }
    int c = n;
    for (int i=0; i<n; ++i) {
        for (int j=i+1; j<n; ++j) {
            if (s[i]==s[j]) ++c;
        }
    }

    cout << c;
}