Search found 1 match

by nguyencaothong
Fri Jun 06, 2014 7:34 am
Forum: Volume 4 (400-499)
Topic: 499 - What's The Frequency, Kenneth?
Replies: 93
Views: 20788

Re: 499 - What's The Frequency, Kenneth?

Could you please find me the reason why my code was WA? I'm stuck :(
#include <stdio.h>
#include <algorithm>

using namespace std;

char s[100000];
int map[256];

int main() {
int i, max;

while (gets(s)) {
i = 0;
fill(map, map + 256 * 2, 0);
while (s[i] != '\0') {
map[s[i]] += 1;
i ...

Go to advanced search