Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
11340 v3.0
#include <iostream> #include <vector> using namespace std; int main() { int casos, car_esp, escrito, valor,suma=0; char caracter; int caracteres[255]; string palabras,palabra2; double precio,sum; scanf("%d",&casos); while(casos--){ for(int i=0;i<255;i++) caracteres[i]=0; scanf("%d",&car_esp); while(car_esp--){ cin>>caracter; scanf("%d",&valor); caracteres[(int)caracter]=valor; } scanf("%d",&escrito); while(escrito--){ cin>>palabras; getline(cin,palabra2); palabras=palabras+palabra2; for(int i=0;i<palabras.length();i++){ suma+=caracteres[(int)palabras[i]]; } } sum=suma; precio=sum/100; printf("%0.2f$\n",precio); suma=0; palabras.clear(); palabra2.clear(); } }
run
|
edit
|
history
|
help
0
sdefrgthyjukiujyhtg
Programa 3(Creo que ya esta)
Policy based smart pointer
3SUM problem
lambda capture
Polimorfizm :)
Full System Specifications
Find the row with max ones
Aiutttt
iuadhfaoiufs