Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.006 s | 1 KBi |
#2 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.006 s | 2 KBi |
#3 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.006 s | 8 KBi |
#4 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.008 s | 8 KBi |
#5 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.007 s | 4 KBi |
#6 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.006 s | 2 KBi |
#7 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.008 s | 1 KBi |
#8 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.007 s | 1 KBi |
#9 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.007 s | 1 KBi |
#10 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.008 s | 1 KBi |
#11 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.007 s | 1 KBi |
#12 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.008 s | 2 KBi |
#13 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.009 s | 1 KBi |
#14 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.007 s | 1 KBi |
#15 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.007 s | 1 KBi |
#16 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.008 s | 1 KBi |
#17 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.009 s | 1 KBi |
#18 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.008 s | 2 KBi |
#19 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.009 s | 1 KBi |
#20 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.008 s | 1 KBi |
#21 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.008 s | 2 KBi |
#22 |
Error en tiempo de ejecución (NZEC)
main.cpp:33:17: warning: expression result unused [-Wunused-value] for(i; i < s.size()-1; i++) ^ 1 warning generated. Exited with error status 1 |
0.008 s | 1 KBi |
#include <iostream> #include <cstring> #include <cstdio> #include <cmath> #include <queue> #include <set> #include <map> #include <vector> #include <stack> #include <algorithm> #define forn(a, n) for(int a = 0; a<(int) (n); ++a) #define rforn(a, n) for(int a = (n)-1; a>=0; --a) using namespace std; const int N = 6e5+20; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s; cin>>s; if(s.size() == 0) { cout<<0<<endl; return 1; } if(s.size() == 1) { cout<<1<<endl; return 1; } int i = 0; int lleva = 0; for(int j = 1; j < s.size(); j++) { if(s[i] == s[j]) { for(i; i < s.size()-1; i++) { if(s[i] != s[j]) {break; lleva = 0;} lleva++; j++; } } } cout<<lleva<<endl; return 1; }