Untitled
unknown
plain_text
a year ago
2.5 kB
1
Indexable
Never
#include <iostream> using namespace std; int main(){ freopen("input.txt","r",stdin); int T,x; cin>>T; for (x = 0; x < T; x++){ int N, i,j; cin>>N; char A[3][1000]; for (i = 0; i < 3; i++){ cin>>A[i]; } int ans = 0; for (i = 0; i < N; i++){ int dem = 0; if (A[0][i]== A[1][i]) dem++; if (A[0][i]== A[2][i]) dem++; if (A[1][i]== A[2][i]) dem++; if (dem < 3) ans= ans +2 - dem; } cout<<"#"<<x+1<<" "<<ans << endl; } return 0; } /* 10 97 euuhxcmrelhaemqucgmmoqwrncrndbjtkmschqxgyddndqpxrtefhtskchngboqtvcnxfgqpbgzqkocnuaftgwoixjerbshgh euuhxcmoeljaeguuwgmlqqwrucankajtksschqxuzdjndqpxxzefhtsochnmbowtvndxfgqpbgzbkolnuqfwgwgupjerbshgh epuhxcmreljaegouhgmfqjwrncanyaotdssuhvbgpdendqpxrzefhtskchnmbowtvhdxrggpbczpkolnuvekgwgihjerbshgh 9 different different different 7 zenkoku touitsu program 100 uhlhjrbvjykqngdbmddahemoiomuwlqbdcykrbulvflxobrzjswfkpbiigftccesrestogfszqbuxqztfytvvqcyvcqllhodnanv ngsupikftnrhpnkhgyrnluaqavegmovwxsenhlppoqausjpfleastfpkkcsqdunyqbmdnohdajhewznvkdpbehnxyretqdfxvtfh zaivaueigdylmwpotkvrzpzasuoctamjnbcmsvmdtinatcbwhdyoesismqjjekirbrgseuzcwpzjugjllskpbtkczaviegrzijak 1 a a a 4 west east wait 98 xbndtyvcddjhpryxisgmxitgxhqxcmyvvxmcfkwxbtpjrhmimeuqdmgdfjpvnhdpwqmwpyqrzojbcktzssxjzawfydlwumwwfh qqowtmvbbzjhsfyrtsimtabichyxcmnvzxweqhnfdfrbpzfodemguugddtbjnhdpwqmwblgxzojszqtzsqxjxawzmbaiyewsfa xbowjytcdztysrqriwgixatgcmqsncyizkmeqknfbtpjrzmodymguucldjpjployxchxbyqxvqvscqilnszuxsbfmdawumewqh 99 pfebyeanqjdofbtavtdsyexkgthqqoyuutuxzsqwcayojftmadeiarkdnayviytfdvhnhavtokshtzjlaostimczclzkkamwfqx pueizefgzztxjbtavcrpyeckgohfqcyykjgmqsqocayhjttbaxeiarqdkayxittcojhpchvqojsxqzoyvustimctulztyamwbtx pfebyoajkjvkmytgvtvpyeakgvhxzomyrjlxqsqccayqjotqabeidradsalmicaswihnetytukspqztuvostimctellysdmrpwi 100 zhuivrqlgunjxmmyntzopstmkwvkmzrncumdmjgmaeweqpkdhfecjlysronjfhnbcafkgzhtbkpaatskndxasklkzhwuikmzwfgl wmssykqlwpcxcqmnaclneavlzuvforkbdkmwmyxdatzlakrzjydgbaxsvafjfunbrdihjwvdqpbtjoppahrbrihwsibkicmndmgv embgwrilgcmjqlsbnbikmmmlvhnktikndqsqoyfdlfnhigfjzdrhzzuvusukfkteajajwrvxugpuqktstduamoviqcylpotzvhfu 100 hjroxxurktsetxjwsijqodphskmfuomqfobhdnibjzzgysqxjxwkcbjmnsxobuecxnnxykeommvaxheeblwguwgoimziuvnqwxgn hjroxxurktsetxjwsijqodphskmfuomqfobhdnibjzzgysqxjxwkcbjmnsxobuecxnnxykeommvaxheeblwguwgoimziuvnqwxgn hjroxxurktsetxjwsijqodphskmfuomqfobhdnibjzzgysqxjxwkcbjmnsxobuecxnnxykeommvaxheeblwguwgoimziuvnqwxgn */