Search found 4 matches

by dpaladin
2 years ago
Forum: Problem set
Topic: 1212 - Jingle Composing
Replies: 8
Views: 2047
Gender: None specified

Re: 1212 - Jingle Composing

Ya encontré lo que necesitaba, el mismo código pero usando las funciones 'gets' o 'scanf', y lo acepto sin problema.
A pesar de que recomiendan no usar esas funciones, supongo que aquí es otro mundo.
by dpaladin
2 years ago
Forum: Problem set
Topic: 1212 - Jingle Composing
Replies: 8
Views: 2047
Gender: None specified

Re: 1212 - Jingle Composing

No uso división ni decimales, se le asigna un valor entero de 1 a 64 a cada letra, si suman 64 es lo mismo que si suman 1 usando fracciones. Es mas rápido así. Un simple for para comparar cada carácter. Es un algoritmo sencillo. Para leer uso while (cin >> s, s != "*") y para imprimir cout << correc...
by dpaladin
2 years ago
Forum: Problem set
Topic: 1252 - The Seven Percent Solution
Replies: 3
Views: 986
Gender: None specified

Re: 1252 - The Seven Percent Solution

Using getline(cin, s), reading characters and printing directly. Even tried ios_base::sync_with_stdio(0). Still TLE with C++11.

Can somebody help me understand what's happening. Am i missing something?
by dpaladin
2 years ago
Forum: Problem set
Topic: 1212 - Jingle Composing
Replies: 8
Views: 2047
Gender: None specified

Re: 1212 - Jingle Composing

TLE on C#, C++ & C++11. Even tried a code i found on internet, marked as a solution for C++

Go to advanced search