andmej / acm

My solutions for problems from the UVa Online Judge (Valladolid).

This URL has Read+Write access

acm / 10090 - Marbles / 10090
100755 98 lines (98 sloc) 24.775 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
ELF4 R4 ('$444444     <@   HHH Ptd```Qtd/lib/ld-linux.so.2GNU
 
(!
yIkK`  PiA93|libstdc++.so.6__gmon_start___Jv_RegisterClasses__gxx_personality_v0libm.so.6libgcc_s.so.1__divdi3__moddi3libc.so.6_IO_stdin_usedputs__assert_failprintfscanf__libc_start_mainCXXABI_1.3GLIBC_2.0 ӯkr ii Rii  $(,04 8
US[%t. hX[5%%h%h% h%$h%(h %,h(%0h0%4h8p%8h@`1^PTRhPh`QVhkU=Ht DҡDuHÐUtt $ÐUWVSlEEȋE E̋EEEEċEUĉEUU;U|IM;M];]v9ED$ED$EȋỦD$T$ EUĉ$T$EUE Eąu1E@E@EȋỦEUMȋ]̋EUĉD$T$ $\$OщE؉D$ED$T$L$ EUĉ$T$EUE؋U܋MQUMUMEUĉD$T$ EȋỦ$T$ӋE؋U܉։M])ӉȉڋMQEUEUEUl[^_]ÐL$qUWVSQ1xD$hD$ ED$pD$$ Yx|]uXD$`D$T$L$ $t$EUM]EUD$T$ $\$ Ѕt$ M]EUD$T$ $\$rӋ`d։`dM]EUD$T$ $\$$ӋX\։X\`dEUptptpቅX\x|։򋍈ӋEU11 t$D$ RD$D$'$1dM]EUD$T$ $\$Ӌx|։EUEUEUD$T$ EU$T$EUx|D$T$ EU$T$EU`d`dكۋEUD$T$ $\$OEU`dكۋEUD$T$ $\$X ЅtEUEMEEEeщʋ`dډ`dX\hlEMEEEeщʋhl)ӉȉډX\X\X\كۋEUD$T$ $\$9EUX\كۋEUD$T$ $\$B ЅtEUEMEEEeщʋX\ډX\`dhlEMEEEeщʋhl)Ӊȉډ`d`dxX\y$ .
`dX\999X\;U;M;]X\EUD$T$ $\$nEȉŰẺMEEEeщʋ`dډ`dX\hlẺMEEEeщʋhl)ӉȉډX\[X\`d999`d;U;M;]`dEUD$T$ $\$EЉUԋ`dhlEԉMEEEeщʋhl)Ӊȉډ`dEԉMEEEeщʋX\ډX\H$EE`dptptptpቅX\hl։Ӊ;];u|;E`dptptptpቅX\hl։EUċX\`d8D$ T$L$\$4$g8H<L@PDT`dX\999`dEUD$T$ $\$E؉U܋`dhlE܉MEEEeщʋhl)Ӊȉډ`dE܉MEEEeщʋX\ډX\`dptptptpቅX\hl։Ӊ;];u|;E~`dptptptpቅX\hl։EUċX\`d(D$ T$L$\$4$(H,L0P4T|X\EUD$T$ $\$EUEMEEEeщʋ`dډ`dX\hlEMEEEeщʋhl)ӉȉډX\`dptptptpቅX\hl։Ӊ ;] ;u|;E`dptptptpቅX\hl։EUċX\`dD$ T$L$\$4$HL P$TPTHLD$ T$L$\$$BiED$$MFuEU Ѕt ƅƅeY[^_]aÐUE@E@@ ]UE PMQEPMAQ ]US$]E EEEEEEEED$ED$$؃$[]U]Ít&'UWVSOá )t$1ED$E D$E$9uރ [^_]Ë$ÐUS  t Ћu[]US[0Y[%lld %lld %lld %lldfailed10090.cppa*n1 + b*n2 == n%lld %lld
%lldint main();$8dzP| (  @L    HRr , hoЁ
 H܃o|oob r„҄GCC: (GNU) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)GCC: (GNU) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)GCC: (GNU) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)GCC: (GNU) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)GCC: (GNU) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)GCC: (GNU) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)GCC: (GNU) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)$,"43&ޖ&B$(X!u_IO_stdin_usedc'"get_gcd"std::pair<long long int, long long int>::pair##std::pair<long long int, long long int>::pairQ#make_pair<long long int, long long int>#main5$$YlintvOK'/build/buildd/glibc-2.6.1/build-tree/i386-libc/csu/crti.S/build/buildd/glibc-2.6.1/build-tree/glibc-2.6.1/csuGNU AS 2.18_']GNU C++ 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)10090.cpp/home/familia/Wack-a-Mole/Programming/ACM/10090 - Marblesstd67!d"e g" hA i[ jt k l m n o s, tU v{ w x z { | }) @ ^ x      @h X Z! ]F _e bijn{opqrtv<wQyl|}~+:[q,͐]ЦшҶ9a:;)<KC7DBEeGLH[I|JKLMNO<Hgx"Ad 0]|,S/Nn=bCiƎǨ A ^ z ԙ ڹ   
! ?! e!nothrow_t(float_denorm_styledenorm_indeterminatedenorm_absentdenorm_presentpair<long long int,long long int>make_pair<long long int, long long int>_ZSt9make_pairIxxESt4pairIT_T0_ES1_S2_!  
nothrowA\% __gnu_debug. / __gnu_debug_def+ intsize_t  size_t unsigned char short unsigned int long unsigned int signed char short int long long int long long unsigned int__quad_t;__off_t long int__off64_t__clock_t__time_t charFILE1. _IO_FILE _flags #_IO_read_ptr#_IO_read_end#_IO_read_base# _IO_write_base#_IO_write_ptr#_IO_write_end#_IO_buf_base#_IO_buf_end# _IO_save_base#$_IO_backup_base#(_IO_save_end#,_markers
#0_chain!
#4_fileno##8_flags2'#<_old_offset)#@_cur_column-<#D_vtable_offset.g#F_shortbuf/
#G_lock3
#H_offset<#L__pad1E#T__pad2F#X__pad3G#\__pad4H#`__pad5I#d_modeK#h_unused2M #l__FILEA.wint_t c%
._1 M
._2 P__wch Q __wchb R%
__count N#__value S #5
d
._3
__pos
#__state
 #j
d
__gnuc_va_list +
_IO_lock_t
_IO_marker _next
#_sbuf
#_pos#
.

 'fpos_t[5
; clearerr ; "[ fclose ; t feof ;  ferror ;  fflush ;  fgetc ;  fgetpos ;   fgets   ; , fopen;  d
d
U freadg    ; { freopen;  d
d
;  fseek ;   fsetpos ;    ftell ;  getc ; getchar) gets  @ perror d
^ putc  ; x remove d
 rename d
d
 rewind ;  setbuf3 ;  setvbuf8 ;   !tmpfile;  tmpnam @ungetc_  ; hsnprintfk   d
"vfscanf ; d
u
vscanf d
u
vsnprintfo   d
u
vsscanf d
d
u
!strcollk d
d
Fstrxfrmo  d
estrtok  d
strerror memchrC   #._12cquotd#reme#._13kquotl#remm#.._14wquotx#remy#clock_t=time_tM__compar_fn_tag${  atexitx %atof d
doubleatoi d
atol d
bsearch     K<div  Qfree[ lgetenv d
ldiv!  mblenh d
mbstowcst  d
 wchar_tmbtowcl  d
+qsort     K rand[reallocY  qsrand strtod d
strtol d
 strtoulR d
 system d
!wcstombsx  ! 'Lwctombo  __gnu_cxxabs_ZN9__gnu_cxx3absEx &div_ZN9__gnu_cxx3divExx  lldiv(  atoll d
strtollԃ d
 9strtoullٔ d
 XstrtofX d
 floatstrtold d
 long double _Exit llabs )lconv87decimal_point:#thousands_sep;#groupingA#int_curr_symbolG# currency_symbolH#mon_decimal_pointI#mon_thousands_sepJ#mon_groupingK#positive_signL# negative_signM#$int_frac_digitsN#(frac_digitsO#)p_cs_precedesQ#*p_sep_by_spaceS#+n_cs_precedesU#,n_sep_by_spaceW#-p_sign_posn^#.n_sign_posn_#/int_p_cs_precedesb#0int_p_sep_by_spaced#1int_n_cs_precedesf#2int_n_sep_by_spaceh#3int_p_sign_posno#4int_n_sign_posnp#5Ksetlocale}  d
!localeconv_7tm,tm_sec#tm_min#tm_hour#tm_mday# tm_mon#tm_year#tm_wday#tm_yday#tm_isdst# tm_gmtoff#$tm_zoned
#( clock_t time_t!clock.|difftime = =mktime= etime= =asctime ectime =gmtime <localtime gstrftime   d
mbstate_t _ wint_tbtowc &  fgetwc    fgetws    fputwc    "fputws  ! Afwide f  dfwprintf n  !"fwscanf   !"getwc    getwchar  mbrlen > d
 g mbrtowc 4  d
 %mbsinit . %+g]mbsrtowcs a  o
 |putwc    putwchar   swprintf y   !"swscanf  ! !"ungetwc   ,vfwprintf   ! u
Svfwscanf   ! u
vswprintf    ! u
vswscanf  ! ! u
vwprintf  ! u
vwscanf  ! u
wcrtomb 8   /wcscat   !Nwcscmp  ! !nwcscoll  ! !wcscpy   !wcscspn  ! !wcsftime 8   ! wcslen  !wcsncat   ! =wcsncmp  ! ! bwcsncpy   ! wcsrtombs g    !wcsspn  ! !wcstod  ! wcstof X ! wcstok   ! Cwcstol  !  iwcstoul R !  wcsxfrm   ! wctob * wmemcmp  ! ! wmemcpy   !  wmemmove   ! A wmemset    ^ wprintf t !"z wscanf  !" wcschr  !  wcspbrk  ! ! wcsrchr  !  wcsstr  ! !!wmemchr  !  ?!wcstold  ! e!wcstoll  !  !wcstoull  !  '@! bool("(EfirstI#secondJ#)!pairP*"+pairT*"
"
"!,"-"get_gcd_Z7get_gcdxxRxS_.a@.b.x".y"/g `/sub_x X/sub_y P","0"!1this""2""ޖ,3"0#!1this"4__aT#4__bT#
"
"2Q#"ޖX3"3#3 #5#LF.__xh.__y`6G%main/n/n1~/n2~/c1~/c2~7&%-c/a~/b~/gcd8ڇc/lcm!/inc_a"/inc_b"7r$9 %7$9 +85c/ans@!~/bestA7$،9 6@7$89 ;H7 %29 LP8/9 VX:__PRETTY_FUNCTION__W%RW%
G%!
nothrowA\%;_ZNSt14numeric_limitsIfE12has_infinityE!;_ZNSt14numeric_limitsIfE13has_quiet_NaNE!;_ZNSt14numeric_limitsIfE10has_denormE!;'_ZNSt14numeric_limitsIdE12has_infinityE!;(_ZNSt14numeric_limitsIdE13has_quiet_NaNE!;+_ZNSt14numeric_limitsIdE10has_denormE!;`_ZNSt14numeric_limitsIeE12has_infinityE!;a_ZNSt14numeric_limitsIeE13has_quiet_NaNE!;d_ZNSt14numeric_limitsIeE10has_denormE!fp /build/buildd/glibc-2.6.1/build-tree/i386-libc/csu/crtn.S/build/buildd/glibc-2.6.1/build-tree/glibc-2.6.1/csuGNU AS 2.18% $ > $ > $ > 4: ; I? 
&IU%% 9: ; : ; : ;<  : ; ( .? : ; @I< I
4: ; @I? < :: ;  9: ; $ > : ; I$ >   I : ; : ;I8
: ;I : ;  : ;  : ; I : ; I8
I!I/ &I: ; .? : ;< .? : ; I< .? : ;I< .? : ;I< !.? : ; I< "#&$I%&.? : ; @I< 'G : ; (G : ; ).? : ; < *I4 +.? : ; < , I-.? : ; @I@.: ; I
/4: ; I
0.G 1I4 2.1@31
4: ; I5.G@6.? : ; I@7 8 94: ; I
:4I4 
;4: ;@I? <  U%# init.cP /build/buildd/glibc-2.6.1/build-tree/i386-libc/csucrti.S,!/!=Z!gg//(!/!=Z! /usr/include/c++/4.1.3/bits/usr/include/c++/4.1.3/usr/include/usr/include/bits/usr/lib/gcc/i486-linux-gnu/4.1.3/include/usr/include/c++/4.1.3/i486-linux-gnu/bits10090.cppstl_pair.h<built-in>cstddefcstdiostdio.hlibio.htypes.hstddef.h_G_config.hwchar.hstdarg.hcstringstring.hcstdlibstdlib.hclocalelocale.hctimetime.hcwcharnewc++config.hlimits]Rl!hY1@&NR=7?=7?1,],ib,n,i4CY =#ޖ=#" zP /build/buildd/glibc-2.6.1/build-tree/i386-libc/csucrtn.SX !!!!!!| ( & ޖ& $B <    /build/buildd/glibc-2.6.1/build-tree/glibc-2.6.1/csuGNU C 4.2.1 (Ubuntu 4.2.1-5ubuntu4)short unsigned intshort int_IO_stdin_usedlong long unsigned intunsigned charinit.clong long intunsigned inthas_denorm_ZSt7nothrowhas_infinityhas_quiet_NaNptrdiff_ttimesttuttޖuޖߖtߖtuttFut Q !t!#t#u,NX\.symtab.strtab.shstrtab.interp.note.ABI-tag.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_frame.debug_str.debug_loc.debug_ranges44#HH 5hhD1o$; ЁCKobbXo||`g ܃p H y,,0t\\Y``||      0<< HHHk@).Fx"I.M;|NFOQP@P_8X&; ]4HhЁb|܃ 
, \  `|   <H !"# ,:GHVD]0 s`  R    , 5< @ QP aB"  &"   P0?AP<]@j`Z z9Hޖ&" LH  , init.cinitfini.ccrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__completed.5982p.5980__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux10090.cpp_ZZ4mainE19__PRETTY_FUNCTION___GLOBAL_OFFSET_TABLE___init_array_end__init_array_start_DYNAMICdata_start_Z7get_gcdxxRxS___libc_csu_fini_ZSt9make_pairIxxESt4pairIT_T0_ES1_S2__start_ZNSt4pairIxxEC1Ev__divdi3@@GLIBC_2.0__gmon_start___Jv_RegisterClasses_fp_hw_fini__libc_start_main@@GLIBC_2.0__assert_fail@@GLIBC_2.0__moddi3@@GLIBC_2.0_IO_stdin_usedscanf@@GLIBC_2.0__data_start__dso_handle__libc_csu_initprintf@@GLIBC_2.0__bss_start_ZNSt4pairIxxEC1ERKxS2__endputs@@GLIBC_2.0_edata__gxx_personality_v0@@CXXABI_1.3__i686.get_pc_thunk.bxmain_init