From 8ccf561c670c2347090a3d5b75698f56a0a53bd3 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 3 Nov 2021 20:19:45 -0500 Subject: [PATCH] Initial commit --- codeforces/Caps Lock/a.out | Bin 0 -> 46658 bytes codeforces/Caps Lock/index.cpp | 40 +++++++++++++++++++++++ codeforces/Next Round/a.out | Bin 0 -> 35218 bytes codeforces/Next Round/index.cpp | 30 +++++++++++++++++ codeforces/Soldier and Bananas/a.out | Bin 0 -> 35362 bytes codeforces/Soldier and Bananas/index.cpp | 18 ++++++++++ codeforces/Team/a.out | Bin 0 -> 35218 bytes codeforces/Team/index.cpp | 21 ++++++++++++ codeforces/Watermelon/a.out | Bin 0 -> 40418 bytes codeforces/Watermelon/index.cpp | 15 +++++++++ codeforces/Way Too Long Words/a.out | Bin 0 -> 45170 bytes codeforces/Way Too Long Words/index.cpp | 21 ++++++++++++ usaco/Teleportation/a.out | Bin 0 -> 35378 bytes usaco/Teleportation/index.cpp | 21 ++++++++++++ 14 files changed, 166 insertions(+) create mode 100755 codeforces/Caps Lock/a.out create mode 100644 codeforces/Caps Lock/index.cpp create mode 100755 codeforces/Next Round/a.out create mode 100644 codeforces/Next Round/index.cpp create mode 100755 codeforces/Soldier and Bananas/a.out create mode 100644 codeforces/Soldier and Bananas/index.cpp create mode 100755 codeforces/Team/a.out create mode 100644 codeforces/Team/index.cpp create mode 100755 codeforces/Watermelon/a.out create mode 100644 codeforces/Watermelon/index.cpp create mode 100755 codeforces/Way Too Long Words/a.out create mode 100644 codeforces/Way Too Long Words/index.cpp create mode 100755 usaco/Teleportation/a.out create mode 100644 usaco/Teleportation/index.cpp diff --git a/codeforces/Caps Lock/a.out b/codeforces/Caps Lock/a.out new file mode 100755 index 0000000000000000000000000000000000000000..1674dc1fa176ce87ecf0d2397086a45c2a575e63 GIT binary patch literal 46658 zcmeHQ4R}<=xt_DTkqrd-i-HhHP}CqPWRnoGg0c`+pacj>YAFJT&1ORuH$P@K5QJWX zL5o8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bVFd`kp1b-Z=8I7 zT=EY;$eQ9j@WklCA55LO<6y{r@TLE_h5h`~;Y;_u(^Ro)&37{MntQD~zi`a^Kgxe` zU~b0qKdT?nYsJI&T=$KyeEQIjr_5~rb^hsDc30trEuZ|kcH}cZOL}qo-Qym2z5l|U z`Op1y=Y@l3)BcgrylCG0-~a1~d#BX==L5T5oL~8?)1~`ue>`&JUd!D1aqX-3tiJ!D zcYeNp#v^GjTHoN}=kR;pW#_*e z>YZD9Wc`XKKcDga7mww>vh{nl>9uK7KOfNh!r!WA{dLr!ZO=C>e6aBkMPIx5jHg=w<9>SLpO^jO^s5ss?k8$bo!h-=QR~dP58gfQ JumAnf{{fKBUH1S0 literal 0 HcmV?d00001 diff --git a/codeforces/Caps Lock/index.cpp b/codeforces/Caps Lock/index.cpp new file mode 100644 index 0000000..cd5c1bc --- /dev/null +++ b/codeforces/Caps Lock/index.cpp @@ -0,0 +1,40 @@ +using namespace std; + +#include +#include + +string parseString(string n) { + string m = n; + string o = n; + for (int i = 0; i < n.length(); i++) { + m[i] = toupper(n[i]); + } + o = m; + o[0] = tolower(m[0]); + if (m == n) { + return "v1"; + } else if (o == n) { + return "v2"; + } else { + return "v3"; + } +} + +int main() { + string n; + cin >> n; + string w; + w = parseString(n); + if (w == "v3") { + cout << n << endl; + } else { + for (int i = 0; i < n.length(); i++) { + if (i == 0 && w == "v2") { + n[0] = toupper(n[0]); + } else { + n[i] = tolower(n[i]); + } + } + cout << n << endl; + } +} diff --git a/codeforces/Next Round/a.out b/codeforces/Next Round/a.out new file mode 100755 index 0000000000000000000000000000000000000000..42467b3606c3e37b1f722c2d0660af68969bd9c1 GIT binary patch literal 35218 zcmeI5e{2-T702J+*|Ci&HrPNKAihu<@xwAUwu!Bz<%oR=mZ@>iZbWIC$$7otE9X1c zw~r=>!waA-wL-4yjFmKp_#wlw9B#7Y8c{|FeVl|vP&s`3Zt*13M) z?)uof7)KGR)IZ)x?`Gc2yti*YJG=YWn|pKSgO3&yX@uf|E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THoYkMoeZ{)|&Qxzq_ul^-D>1cZPP z5CTF#2nYcoAOwVf5D)@FKnMr{As_^VfDjM@LO=)z0U;m+gn$qb0zyCt2mv7=1cZPP z5CTF#2nYcoAOwVf5D)@FKnMr{As_^VfDjM@LO=)z0U;m+gn$qb0zx27z=u{VI<7TfB>Tc3o+Ei7Q-WBRqW^X8L z#+&p&AkZ5R1jF-K#TK-x?&&iF`lmLl-5cqPcg-8+!qEY%VK22tk0Bmc zI5kGJGjf|1GfFiFXYR7?s=ZPL0&Nc{mzP@IJlJCZQ<{6m-D#|{SJGzIn?`SUI2tky zz5z<_52+4gUpT7tkg0cZ*S`LK)noL=W6@9~Y#vkxD(#J=Das{}qT=pQI7(6SbayGE z-_ZL^Lv@X>BD~V=8O-ZKH@2Vd`K&=v%^@0;U#zw5?{a` zM%PyzozK=_{d(KAj67->?&+s_5IG@YG_E4z^VSCy=1< z_~VcwG)x@s!Fq??&t_KX#V`7K$SODoCqw^jmi|GOzRosI+kZVvKbEDxoTdLVOTUz* zPi5)<%F=VO61&R^pZNR`K0AcZ4dF9G_`DE4D}>)iIID+BA}bVt5$6_ zD&r$m?|f!r_@K=DiK%@m+-XEJJ{LQ0ec75|lU^x4NWtcI6>LVQ^9{_nR(hh#r_v*# z=svt^BN3H;57VO!4S132Mvtk?P)Ee5ww{NX_ZFYWlXwgY9!IN`qK}`>Z;=OIe~yJLTRfA9I6E0dG^J-c@2rVjt=@S*4b`r3;-zEghslg71+ zhmub(dUN#n8>d&Cez1De{-SNZrEkxi_&2 L#L~jI*1z{(Pvk$Y literal 0 HcmV?d00001 diff --git a/codeforces/Next Round/index.cpp b/codeforces/Next Round/index.cpp new file mode 100644 index 0000000..3a9e24e --- /dev/null +++ b/codeforces/Next Round/index.cpp @@ -0,0 +1,30 @@ +using namespace std; + +#include + +int main() { + int n, k; + cin >> n >> k; + int w; + int a = 0; + for (int i = 0; i < n; i++) { + int j; + cin >> j; + if (j == 0) { + break; + } + if (i == k - 1) { + w = j; + a++; + } else if (i > k - 1) { + if (j == w) { + a++; + } else { + break; + } + } else { + a++; + } + } + cout << a << endl; +} diff --git a/codeforces/Soldier and Bananas/a.out b/codeforces/Soldier and Bananas/a.out new file mode 100755 index 0000000000000000000000000000000000000000..91e6bebfc820a9c8ecbf313b131e77156d38328f GIT binary patch literal 35362 zcmeI5VQdt~6~|}q?AQ*jbKoRU2;31z5h<>*v2k%j%NqNLEfeGT9F?Lp)4TOzADr*3 zyLD{GB)!%UQPCurxM`w9sZl;OMo_tJ+SqENSS4!s5RqD~Xo;%CP^mJlLM4<)T;Op3 zZ+C6>E)J+g?T6}(^ls+8nR)x>x3jzc^2YCd`q9-wAryh)f-HfwnSx05xqn3FS2pV7$A0SuI~&A+29v)i1nX4-_U=fX^akjx^bq4ycKf-2kJ zm;-RUpi_6LS$k+MV6q~53L z-G(%Rp=^JBn=OAndpzk*f3|tPlCme-8;-WiaCBD;)@*+-*#0{08Khs&AKix+Oh5It zZMCv)dvn0L8>+ntP@5&IcEd&xQJDVr zgYSQ{`j^j_Zusk)yHA&_hs_7E)mxt3&z*&4mP4q| z+z;-t9P&CJ3*yn%t}Ux5Lr~$68Rtglc;UrkmpMMrpD^^UvMu%$j27Zv2*smPv2ZT86yiwH2g$XbLCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO1egF5 zU;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO1egF5 z_`f7DdqPa52VA4+K{52!3Geu9v6#R@$AnK!9Vro0&j>Mmq*6@%0QK1tG4wR*H6qzM zlP4x-@{$wh^VHORxnd|^Dfq{3MYPT2sS~4va=hS)f)z8x>ICeIX5f?T`MF{-&AT`| zyL7Zpj@$ivsQ)a+n%BKYO+A5YAk}ef^%^yWB+B8D6LLH~uw@jn4o$k{>DfVwSs6{& ziJ|E{kvi)ZscFP9<5p8b*?c-ZP&hD@R8Ly_a4~csGs=%1f_lVhU?b-EYrZ ziuxSPKhm6mt#ad%74gd#!QEGaa5T zR#U4`FNb9Fpm zlrvl?a^T0BwMh}Kx8Zn=%f5&Zc9yj#XxZ7n(S6uwkK)jc6*YPhfMY_*fr%vlWyl!Cry=qm;e)C0!)AjFaajO1egF5U;<2l z2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO1egF5U;<2l z2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60pSCK7RVt8&O?|#8~{z69&oMD{}P`o zW?RK+0P38@n&-j+0?OTxZpbmnGDRr+AQvI+IC$U`v#C@QWd z<-^uLyl>SLJzYBVoy|=Fqf*L>>PSorM)aDVgf4dlHQn&HHV4Y(`f$77Ic#G%mXM)f zLa*-74NUPrX7*Y>Dk{+v)?_$g#PwiTqt+ad6%|@%FfNUFFl;0mHNW2O{hGC?jjtfVc-l7I#c6WTcb1u%q zF^kW!$8YXQ`Rsm`=2qqxV)hGW;dl1`?1lK>eU;JoF7s10_g-Ci*?66|Y;6rx%0QLO z_zc$AAG#PmX$yYjHuQ$u^=QVYXWO-JYa`~&uN0re)}}Vu+61Hh70$TU{6L3KsYQa( z4!pJ_5jp=(7Z23c;kB&k-G(%Rp@?2-KSy)brymqf;t4+t9j^hi+zuN(Edgf~Fv4(ehmmd6W$=<&_|D&}J z?zx=szA^NT>QYa0`pUpqXw#+}`M=rzGrc2S$C}pt>=%CvG@tu;|EY^lzP$MObKYKg M_}rc|KRj~rU)kMb>i_@% literal 0 HcmV?d00001 diff --git a/codeforces/Soldier and Bananas/index.cpp b/codeforces/Soldier and Bananas/index.cpp new file mode 100644 index 0000000..71bb126 --- /dev/null +++ b/codeforces/Soldier and Bananas/index.cpp @@ -0,0 +1,18 @@ +using namespace std; + +#include + +int main() { + int k, n, total_cost; + total_cost = 0; + long w; + cin >> k >> n >> w; + for (int i = 1; i < w + 1; i++) { + total_cost += i * k; + } + total_cost -= n; + if (total_cost < 0) { + total_cost = 0; + } + cout << total_cost << endl; +} diff --git a/codeforces/Team/a.out b/codeforces/Team/a.out new file mode 100755 index 0000000000000000000000000000000000000000..9dff8e4a206709e71f5ccb074bb0bb50e83a3f52 GIT binary patch literal 35218 zcmeI5e@q<56~|}qzc~Z{z@6q`}~nqSEfJlnCY*7VFq-&zg){77#c;&PF0m!zpC}< zQup~Y{qYxycf)0E0@OyysGaB}p?g&X!8*gX+W>uWe<^M*(;lWqS%%-`R-3BZ`)q$hQ=_N8 zVPTI%Gvb0yD?9#__wtW1lyrg*#Mz9uJ4Syua4Cg zzO%OASbbe*({}WgLd-Rhb%D{QScJIZcm%)3`V3u&hp;~KL;Kub$g%=LW5#}PPGynT zR4j-`-MY2BvK&DL{6?HL_W7a&k6rrwmVt<_b(cSGnP9dMUxQFQx!_6l!99F%0Eni2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)Aj zFaajO1egF5U;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%n85!7f#hW| zlNfYNB!i#XRI1(yH$1lqZiNVJwu#S;S zPC1(#qV*^f3AY%T%MtN;r-;wxxZ*LVD=w7BW)p*T6PUB;+?X*>#Hr3xT=9p0@bpcg z*YXi-KDb9du0fus*_R`x$1xvi$fJmB8VR7qiNX4bq+2o8 zK)&aS5p#(-ZwL7-cEvZNUJuFSLGc>=9&*Kz%Q~7Cb0)hIQA_jZOD@&s3RgULlgUtQ zq!?~qDJBr-YsUipFIZ9@Y_A*<0xvjmz)?Q_6ud%h)+uG%}_I6u)r`b-v zwn31W9>QbxTg4)RCMLK+s3xOl&w;p|z`l|pq z71DF}AlDf>NfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO1egF5U;<2l2`~XBzyz28 z6JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)AjqzIIv)eLzVQV2260zd=B%>Osr zIDa8kjJ6A>0k~3KhMfZk2q+IgdLWaKwTe()gxrMqaqz$k4w3jd>I$b&z6W_3@;2m8 zIB`JA@0fpf@6{rG-5T_RO^q#jm6Vk`gJIPd)N1=8n(XkYn(py7wN%LMfp(95T1_Av zk$zu9+u5n{qJ5sx>p zh*fw=tE!$p-J^bGvmG75zDU=iQ7(PGV8mk&vPunvOc3T$tJN^#v4vBuh1!F6STUiL z3vd=L+bUZtq{q{;OWM5bQ1yWx4VY5g)9y}vrMZ$8y;j$Hy8|JguF(yUYQInVwa!3D zsyo~gQ!1L%AOon%4*CoHeh%K9)##_>|u00Vd-?X2I)Vt z^wXC92TT8*rC)=-S&52&S^6y+#}=n^ImjNWD8%@r<$s@{;{*~E8h;W}hz6bULAu}U zCo`k;;urliWRzF&YuA61p?{j8Z!ssQ?4Qce&t&LtWa#f^=vOoJ`3(KD3_TkwF}sZL z1)U#4XNSYIPNmegoA2(K_~O2l z#+K!m7+%+zZ4o(AOsYL$UBKykqpu-}JUr$(CxF_7SSJJ~Lr_P!|2f z>^K}~*FtHZi~YC1Yz?qUtrQ<5Z)2rpX5at!RZ;fSj~c6U xwm$M@{_l4D#!psfjlXh!&+b=`C02H8FaF~%({FF~|Mv6I_ug8QqyGK7{{`_gHDmw) literal 0 HcmV?d00001 diff --git a/codeforces/Team/index.cpp b/codeforces/Team/index.cpp new file mode 100644 index 0000000..746b9e0 --- /dev/null +++ b/codeforces/Team/index.cpp @@ -0,0 +1,21 @@ +using namespace std; + +#include + +int main() { + int n; + int c = 0; + cin >> n; + for (int i = 0; i < n; i++) { + int k = 0; + for (int j = 0; j < 3; j++) { + int l; + cin >> l; + k += l; + } + if (k >= 2) { + c += 1; + } + } + cout << c << endl; +} diff --git a/codeforces/Watermelon/a.out b/codeforces/Watermelon/a.out new file mode 100755 index 0000000000000000000000000000000000000000..8589d573e1f8167b27169317947211f5d2fc93d0 GIT binary patch literal 40418 zcmeHQdvsLCd7ry?ffWy<7}=;GEP<&l+cIeNLMk{cNNbQ0LXngdW6bqx_e$Eb+Ld=# zJPftv2-hU0t(B^$wD=T3NGef6i9=7VhQ#%@fy9OC%6*b(4AmSZQyj_Ycv74`Sc zon76%S{{MW$I0BoXy!MMZ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O9ee~p+R)6a{ zGG>*acl-3OW5%8A1D6&Jfn?}nz7{gD$}`F4+wZ=|r# z!_M+bJ3HDcRR|+%>S)&d*#GbYfy7>t_D0aHp`8BFrZc(sawFP2^QIM(zSXpOPP2dY zHWXny#$}4*mtnlysX*d59q!WX0KUi zIrg!UDE5zhQ>u9bo?r_$h1f49ca|p7YMiB-h9e^_*bxY{M{!7$s%}Lx-n*f$QR6$? z(&X6=j#AKPS7VDwHc$KW>rV|MD;7_BoF*!x9>KeJDD;ST`|**XCK*wK$M^CX;Dv$yI~2&*s4Zt70!yx zop`G>Df)Fasaen*3UBm;eOD~V_2&~vSy*oiZP3x~WqkIb`r1u_2t$N3}byuHOLat z?TKHBU_Eg=3zLx{oUA*|b5l))u)$Ds!V2p#&P@aB*ICvvJg)EM|>hm1UKc zIDPi&?fAu%rzxP9Fl)?$F)>c(n5dG%u~9hqG(DH!n|u@}9xo#b#~%F2LL8mK{57-T zu)@aAe%2vnwMfSa;7f&hHrzgbU5_h~OYzLZ`!CDQ`^ld^TKnB^edNe=|FK#Y{_}zd zm%j5a7Y@F=?Dcn-#*Y5ux1Krh^6Jn(Uu-^V|LN(|>usx6j~m%~c4twX#d3I&b!qVOIfAReIA3n4B?0;siS@^l{ z+fTpt_m?gy{obJV#kGIi^8ED8+V|?OCI4pAvoC9B@7?in=sWudCglI%(@*w);TL-M z+=J6Dvt6%keC@)$7hZj*YU#iItNq`bPdtC};G7>XThw{{DPQ$Bc7Ltfwd#%Roc{)~ C=6?JD literal 0 HcmV?d00001 diff --git a/codeforces/Watermelon/index.cpp b/codeforces/Watermelon/index.cpp new file mode 100644 index 0000000..fbc4c75 --- /dev/null +++ b/codeforces/Watermelon/index.cpp @@ -0,0 +1,15 @@ +using namespace std; + +#include + +int main() { + int n; + int i; + cin >> n; + i = n - 2; + if (i % 2 == 0 && i > 0) { + cout << "YES" << endl; + } else { + cout << "NO" << endl; + } +} diff --git a/codeforces/Way Too Long Words/a.out b/codeforces/Way Too Long Words/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d_J6xBd+CmcpFO$d%J*(;yyEshz0z6qZ@;-?`+IkO>-00%+GjeKuWP!q=k4rk v9~n7q$C@jCvuDdQZ)|*T@zc+`k9_^ZZ!cZ)UiHg=efsI66+gb_g~$E@+?QZQ literal 0 HcmV?d00001 diff --git a/codeforces/Way Too Long Words/index.cpp b/codeforces/Way Too Long Words/index.cpp new file mode 100644 index 0000000..767eb26 --- /dev/null +++ b/codeforces/Way Too Long Words/index.cpp @@ -0,0 +1,21 @@ +using namespace std; + +#include +#include + +int main() { + int n; + cin >> n; + for (int i = 0; i < n; i++) { + string s; + cin >> s; + int length = s.length(); + char first = s.front(); + char last = s.back(); + if (length > 10) { + cout << first << length << last << endl; + } else { + cout << s << endl; + } + } +} diff --git a/usaco/Teleportation/a.out b/usaco/Teleportation/a.out new file mode 100755 index 0000000000000000000000000000000000000000..99953cfb26fc42d1a675686ee40c5ad5fa2df4a6 GIT binary patch literal 35378 zcmeI5YitzP701u)8Zg)aCk`Pmyh}n8D3-A?ICeskrS>L95JPN7MTl~6({muy1-Tn#-Y=2;A6{WW8x-!zb(P=6( z67~8^KW_UAI^$V)`*X}wl~Ub_U9m))iY2xsVfFeObo{kDGg!ZoKYk8_mY;?-t!q^M zhNc$#X@s0ZfZ8ga+7BZOKdTZ5_L+1&2I$lK%V4ZkLiT(|qnT(FvDBuJnM3G zanrpn)|Jwe9UaL8x4GEsvfI`*b8QbftDBeiEMGhS>(@4|3pcFIo!yh3b-^!}6?5#G z{kVOtB+4*1J}rZ|VYQ2;uX(ygSvkJRXZKZ|jM-LFdAAcpYbUOqRaY@yOP(!e>9+_t^tID_{#k z>^<@9Vyn&kiGJhzHm=tGES+cxw!nV){c{(dSqb4ji@SfcfW1zw1?$n5Evu-iz@lPN zYn`?3@f5(%LH_ubo|I{HRD8#og3&||KzKbN@Z@@_qcdMF3n6SDIzV*T{h+v0iVzS2 zLO=)z0U;m+gn$qb0zyCt2mv7=1cZPP5CTF#2nYcoAOwVf5D)@FKnMr{As_^V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lC<(W9)xQ2~;Mu)lWJF}~30-{I)Rj-G&yaeP~= z?7mL0bkAA|VpZDk&J^B@oek*ojo2=#2gSI}k zKh9IaIZ8M`2~)ilavP)+f*d%6d^Cg{GIS5*Mq_VB|9l8PiaQ|gxyX5A%|}H+*PC^7 z@8?(F2NfX|C1t%pDov^f_mUsiD(|n{^q+ul`s4aP_*vvnVg6Sv_d|W%Eo^+ExusgQ ztWnV^4o2q#op-OPfi9m) zk4F;Q@g0cA)zn9Vo~*COFS>4Yn#zns<3=^VA7A{b_$1!g!)W5QwaV?V@msrxeE568 zXZ<#9Mb9RuAE}5A3WR9)4c>KeHNQ6D?4*&r~f}q*o=k% literal 0 HcmV?d00001 diff --git a/usaco/Teleportation/index.cpp b/usaco/Teleportation/index.cpp new file mode 100644 index 0000000..001895e --- /dev/null +++ b/usaco/Teleportation/index.cpp @@ -0,0 +1,21 @@ +#include +int a, b, x, y; + +int main() { + std::cin >> a >> b >> x >> y; + int path1; + int path2; + int path3; + int ans; + path1 = std::abs(a - b); + path2 = std::abs(a - x) + std::abs(y - b); + path3 = std::abs(a - y) + std::abs(x - b); + ans = path1; + if (path2 < ans) { + ans = path2; + } + if (path3 < ans) { + ans = path3; + } + std::cout << ans << std::endl; +}