結果

問題 No.3006 A winter wonderland
ユーザー mamekinmamekin
提出日時 2018-04-08 20:57:16
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 9,324 bytes
コンパイル時間 1,031 ms
コンパイル使用メモリ 100,156 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-09 03:14:31
合計ジャッジ時間 2,543 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 2 ms
4,376 KB
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 1 ms
4,376 KB
testcase_32 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
using namespace std;

const string SQRT2 =
"1"
"4142135623730950488016887242096980785696718753769480731766797379907324"
"7846210703885038753432764157273501384623091229702492483605585073721264"
"4121497099935831413222665927505592755799950501152782060571470109559971"
"6059702745345968620147285174186408891986095523292304843087143214508397"
"6260362799525140798968725339654633180882964062061525835239505474575028"
"7759961729835575220337531857011354374603408498847160386899970699004815"
"0305440277903164542478230684929369186215805784631115966687130130156185"
"6898723723528850926486124949771542183342042856860601468247207714358548"
"7415565706967765372022648544701585880162075847492265722600208558446652"
"1458398893944370926591800311388246468157082630100594858704003186480342"
"1948972782906410450726368813137398552561173220402450912277002269411275"
"7362728049573810896750401836986836845072579936472906076299694138047565"
"4823728997180326802474420629269124859052181004459842150591120249441341"
"7285314781058036033710773091828693147101711116839165817268894197587165"
"8215212822951848847208969463386289156288276595263514054226765323969461"
"7511291602408715510135150455381287560052631468017127402653969470240300"
"5174953188629256313851881634780015693691768818523786840522878376293892"
"1430065586956868596459515550164472450983689603688732311438941557665104"
"0883914292338113206052433629485317049915771756228549741438999188021762"
"4309652065642118273167262575395947172559346372386322614827426222086711"
"5583959992652117625269891754098815934864008345708518147223181420407042"
"6509056532333398436457865796796519267292399875366617215982578860263363"
"6178274959942194037777536814262177387991945513972312740668983299898953"
"8672882285637869774966251996658352577619893932284534473569479496295216"
"8891485492538904755828834526096524096542889394538646625744927556381964"
"4103169798330618520193793849400571563337205480685405758679996701213722"
"3947582142630658513221740883238294728761739364746783743196000159218880"
"7347857617252211867490424977366929207311096369721608933708661156734585"
"3348332952546758516447107578486024636008344491148185876555542864551233"
"1421992631133251797060843655970435285641008791850076036100915946567067"
"6883605571740076756905096136719401324935605240185999105062108163597726"
"4313806054670102935699710424251057817495310572559349844511269227803449"
"1350663756874776028316282960553242242695753452902883876844642917328277"
"0888318087025339852338122749990812371892540726475367850304821591801886"
"1671089728692292011975998807038185433325364602110822992792930728717807"
"9988809917674177410898306080032631181642798823117154363869661702999934"
"1616148786860180455055539869131151860103863753250045581860448040750241"
"1951843056745336836136745973744239885532851793089603738989151731958741"
"3442881784212502191695187559344438739618931454999990610758704909026088"
"3517636224749757858858368037457931157339802099986622186949922595913276"
"4236194105921003280261498745665996888740679561673918595728886424734635"
"8588686449682238600698335264279905628316561391394255764906206518602164"
"7263033362975075697870606606856498160092718709292153132368281356988937"
"0974165044745909605374727965244770940992412387106144705439867436473384"
"7745481910087288622214958952959118789214917983398108378827815306556231"
"5810360648675873036014502273208829351341387227684176678436905294286984"
"9083845574457940959862607424995491680285307739893829603621335398753205"
"0919989360751390644449576845699347127636450716327915470159773354863893"
"9423257277540038260274785674172580951416307159597849818009443560379390"
"9855901682721540345815815210049366629534488271072923966023216382382666"
"1262683050257278116945103537937156882336593229782319298606467978986409"
"2085609558142614363631004615594332550474493975933999125419532300932175"
"3044765339647066276116617535187546462096763455873861648801988484974792"
"6404506544489691004079421181692579685756378488149898641685499491635761"
"4484047021033989215342377037233353115645944389703653166721949049351882"
"9058063074013468626416724701106534634939164071462855679801779338144240"
"4526913706660977763878486623800339232437047411533187253190601916599645"
"5381157888413808433232105337674618121780142960928324113627525408873729"
"0512940733947943306194395693670207942951587822834932193166641113015495"
"9469837897767434443539337709957134988407890850815892366070088658105470"
"9497904657229888808924612828160131337010290802909997456478495815456146"
"4871551639050241985790613109345878330620026220737247167668545549990499"
"4085710809925759928893236615438271955005781625133038153146577907926868"
"5008069844284791524242754410268057563215653220618857512251130639370253"
"6292716196825125919202521605870118959673224423926742373449076464672737"
"5347964598819149807931718002423855453886038368310800779182466462754117"
"4442500187277795181643834514634612990207633430179685543856316677235183"
"8933666704222211093914493028796381283988931173130843004212555018549850"
"6529455637766031461255909104611384768282359592477228629042642736163264"
"5854433928772638603431498048963973633297548859256811492968361267258985"
"7383321643666348702347730261010613050729861153412994880877447311122954"
"2652751653665911730142360626525869077198217037098104644360477226739282"
"9874152593069562063847108274082184906737233058743029709242899481739244"
"0786937528440104439904852087885191419354151290068173517030693869705900"
"4742515765524807844736214410501620084544412225595620298472594035280190"
"6798068098300396453985685930458625260637797453559927747299064888745451"
"2424960763780108639001910580928747647207511092386059501954322816020887"
"9621516233852161287522851802529287618325703717285740676394490982546442"
"2184654308806610580201584728406712630254593798906508168571371656685941"
"3005331970365964033766741461049563765103083661348931094780268129355733"
"1890551970520184515039969098663152512411611192594055280856498931958983"
"4562331983683494880806171562439112866312797848371978953369015277600549"
"8055166350197855571101405552976338412750446860464766318326611651820675"
"0120476699109872191044474403268943641595942792199442355371870429955924"
"0314091712848158543866005385713583639816309452407557009325168243441682"
"4083619792733728252154622469615332170268299509790890345948588783494396"
"1620435842249739718711395892730509219705491717696160044558089942787888"
"0369169432894595147226722926124850696173163809410821860045286102696547"
"5763043102560271523139694821355198214097165490973199928349256740974903"
"9229712634869341457493319804171807611196390227866407592243416776246623"
"6238913110270343304576368141128321326308582239456219598086612939996201"
"2341561763181743124200890149838485604808798646083935964923665142968125"
"7731432291456871682762199611827826953157498380262465175905410397618128"
"7604216386134502213262727756612441133610775195557749508656360673786650"
"6231856406991228018757417854946612532759976979605977605907564891066610"
"1583841720281853043211904465775255427754379872605488173619826758168628"
"3295260789932226683602838513512281059318591028641508157056319717315183"
"1362502435904146321223921766339826893682531505300598915470290953719326"
"6207341123494743367884690201390497842852163414429214589558287847669394"
"6464267812219049785636355263368278051860098699248937786002398769169807"
"6566219438985443708059464333623338105874581623547560013659243524265714"
"3083465545768002370814675732525470255074763747163506785159917369379325"
"1032682760628645914618204721486370370771926926823623334720379245964691"
"8105261391530862802914409654825638730927304265446629290458960637519187"
"1146934536197332478957270703153093090192119919999361576500350398405406"
"7425387927527922724733566770607837911384488936261367657060263600315132"
"9520953952028548973844862561349244147086070866026763499787934208758361"
"2194711699422384848259591430452810706260150896913530301772006271705440"
"2090669514915274597719705947695474095210287872557856880022193717743558"
"1107939308833845586482772910086295545661413067212308487402271210586863"
"2338823741388442893815544464710575565146843570294663506289387356986868"
"8376480326519528414653517395302736120137420300986739838514321900436028"
"9826982935293994141292305803845650227072168151619410114498263013649008"
"7704839848838609065336859905458389520318564804149327214239086516499943"
"1659207965953569430723112911629286797517156688905439322035691293324570"
"2080671944404973049439814082278296027994245410831666759214248351827238"
"1720504103927428880155622338079614751243351473102128454594489944499600"
"0752437519570116683417447490795882099517836768023236517674972301487457"
"7427259947609621984327148352986111902728735849052179759083741974860267";

int main()
{
    // find the first substring equal to the given x from sqrt(2)

    string s;
    cin >> s;
    cout << SQRT2.find(s) << endl;

    return 0;
}
0