2023-01-01ãã1å¹´éã®è¨äºä¸è¦§
以ä¸ã®åé¡ã®è§£èª¬ãç解ããããã®ç¥èãã¾ã¨ãã¦ã¿ã¾ããã atcoder.jp ç¹°ãè¿ãäºä¹æ³ ç¹°ãè¿ãäºä¹æ³ã¨ã¯ãx1, x2, x4, x8, x16, ... ãçµã¿åããã¦ãxnãé«éã§è¨ç®ããã¢ã«ã´ãªãºã ã§ãã x1, x2, x4, x8, x16 ã¯ãäºä¹ãã¦ããã°ãç°¡åã«æ±ãã¦ãããâ¦
atcoder.jp DPããã¤ã¤ãã»ã°ã¡ã³ãæ¨ã§é«éåããã æ®æ®µã¯é ãDPã§å®è£ ãããã¨ãå¤ããããã®åé¡ã§ã¯è²°ãDPã§å®è£ ããã»ããè¯ãããã dpã®æ´æ°ã¯ãã»ã°ã¡ã³ãæ¨ããå段ã®LããRã®éã®æ大å¤ãåå¾ããã ã»ã°ã¡ã³ãæ¨ã®æ´æ°ã¯ãdp[i]ã®å¤ãä¸éãä¸æ°â¦
atcoder.jp 2ã3å解ãã¦ãããããªããªãè¦ããããªãã®ã§ã¡ã¢ã ãã³ããã¿ã³è·é¢ãåºãããã²ã¨ã¾ã45度å転ãèããã®ã¯è¦ãã¦ããã 45度å転ã®æ¹æ³ã¯ (X, Y) = (x-y, x+y) ãè¨ç®ãããã¨ã 45度å転ããã¨ãè·é¢ã®é åãæ£æ¹å½¢ã«ãªããå¦çãããããâ¦
atcoder.jp ã½ã¼ããã¦ãæå°å¤ã¨æ大å¤ã«å¯¾ãã¦ãæä½ãç¹°ãè¿ãã°è¯ãããªã¨æã£ããããã¾ããããã«TLEã çãã«ä¸éããããã¨ã¯åãã£ãããï¼åæ¢ç´¢ããçºæ³ã¯ã§ããªãã£ãã å ¸ååé¡ã®ãçãã§ï¼åæ¢ç´¢ãããã¯æãã¤ãããã£ãã ãã®ãã¨ã®å¤å®åâ¦
atcoder.jp æ«å°¾ãT[i]åã®0ã«ãªã£ã¦ããæ´æ°ãä½ã£ã¦ããã°è¯ããã¨ã¯åãã£ãããä½ãæ¹ã®æ¹éã誤ã£ã¦ããã ã2T[i] ã§å²ãåãã¦ã2T[i]+1ã§å²ãåããªãæ´æ°ãã¨è¨ãæããããã¨ããã¯å ¸åã£ã½ãèãæ¹ãï¼ ä¸è¨ã®æ¡ä»¶ã«å ãã¦ããA[i-1]ãã大ããæ´â¦
atcoder.jp æµ®åå°æ°ç¹ã®ç解ããã¾ãã£ãããã§ACã§ããªãã£ãã 100åãã¦è¨ç®çµæã100ã§å²ãã¨ããã¾ã§ã¯æãã¤ãããããã£ã¹ãã®é¨åã§ã誤差ãåºããã¨ãç解ãã¦ããªãã£ãã ä¾ãã° 0.79ã®å ´åãï¼é²æ°ã§è¡¨ã㨠0 .1100101000111101011100001010001â¦
atcoder.jp 1ã®ä½ã®å¨ææ§ãèããã BCã¯ç¹°ãè¿ãäºä¹æ³ã§æ±ãã¦ãå¨æã®é·ãã§å²ãã°è¯ãã å¨æã®ä¸ã§ã©ã®ä½ç½®ã«ããã®ããæ±ããã®ãå°ãè¦æ¦ãã¦ãã¾ã£ãã ä¾ãã°ã3 ã®å¨æã¯ã3 9 7 1ãã®é·ã4ã§ããã39 ã®å ´åã¯å¨æã«ããã1ã¨ãªããåç´ã« 9 % 3â¦
atcoder.jp è¶diffãããããå®æã¨ãã¦ã¯ç·diffãããã«æããã å¤ã®ç¯å²ã«ãã¤ãã¹ãå«ã¾ãã¦ããã®ã§ãå ´ååããå転ãããå¦çãæãã¤ããªãã£ãã å¤ã®ç¯å²ãæ£ã®ã¿(D>0 && A,X > 0)ã§ããã°ãç¹ã«é£ãããã¨ã¯ãªãã è² ã®å ´å(D<0)ãå転ããã«ã¯ãâ¦
atcoder.jp çµæ§é°å²æ°ã§è§£ãã¦ãã¾ã£ãã ã¾ãceil(AiM/N)ã§Biããã£ããæ±ããã Biã®åè¨å¤ãç®åºããããMã¨å·®åãåºãã®ã§ãmax(BiN - AiM)ãæå°ã«ãªãããã«ãBiã®å¤ãæ¸ããã¦ããã max(BiN - Ai*M) ã大ããé ã«æ¸ããã¦ããããã®ã§ãPriorityQueâ¦
atcoder.jp 表ãè£ãã§é·ç§»ããåçè¨ç»æ³ã dp[i][j] := ã«ã¼ãi,...,iã¾ã§ã®åãjã«ã§ãããªã1ãããã§ãªããªã0 dp[i][j] = 1 ã®å ´åã以ä¸ã®é·ç§»ãããã - dp[i+1][i+a[i]] = 1 - dp[i+1][i+b[i]] = 1 dp[N][S]ã1ã§ããã°Yesãããã§ãªããªãNoã ã¾â¦
atcoder.jp UnionFindã ããã¨æã£ãããACLã®ä½¿ãæ¹ã®ç解ãæµ ãã£ãã®ã§ãBFSã§è§£ãã¦ãã¾ã£ãã void solve(long long N, long long M, std::vector<long long> u, std::vector<long long> v){ vvl G(N+9); REP(i, M) { G[u[i]].push_back(v[i]); G[v[i]].push_back(v[i]); } vb</long></long>â¦
atcoder.jp å帰çãªDFSã ããã¨æ¸ããããã«ãããã void dfs(string S, ll n) { if (n==0) { cout << S << endl; return; } REP(i, 3) { S.push_back('a'+i); dfs(S, n-1); S.pop_back(); } } void solve(long long N){ dfs("", N); }
ã¯ããã« ã½ããã¦ã§ã¢éçºã§ã¯ãåé¡ã解決ãããã¨ãæãéè¦ãªç®çã§ããããããå®éã®éçºããã»ã¹ã§ã¯ãæè¡çãªèª²é¡ãããã°ã©ãã³ã°è¨èªã®è¤éãã«ãã£ã¦ãæ段ãç®çåãã¦ãã¾ããã¨ãããã¾ãã以åãç§ã¯ãã¤ã·ã¥ã¼ããªãã³ã§ã½ããã¦ã§ã¢ãä½ãâ¦
1. ChatGPTã§ã®ããã°è¨äºä½æã®é©ãã¹ãç°¡åã å æ¥ãChatGPTã使ã£ã¦ããã°è¨äºãæ¸ãã¦ã¿ãã¨ãããé©ãã»ã©ç°¡åã«è¨äºãä½æã§ãã¦ãã¾ã£ããããã«ã¯æ£ç´ãé©ããããã 2. ããã°ã®ç®çã¨ChatGPTã®æ´»ç¨æ¹æ³ ããã°ã®ç®çã«ãã£ã¦ã¯ãChatGPTã®æ´»ç¨æ¹æ³â¦
1. AIã®é²åã¨ã¨ã³ã¸ãã¢ã®å½¹å² ChatGPTã®é²åã«ããããã¾ãã¾ãªã¿ã¹ã¯ãAIã«ç½®ãæãã£ã¦ããããããåãã¦ãã¨ã³ã¸ãã¢ã¨ãã¦æ°ããªå½¹å²ã¨æé·ãæ±ããããæ代ãå°æ¥ãã¦ããã 2. éè¦ãªã¹ãã«ã¨è¦ç¹ åé¡è§£æ±ºãä»äºãAIã«ç½®ãæããä¸ãã©ã®ãããªåâ¦