09 2023 档案
发表于 2023-09-27 17:53阅读次数:32评论次数:0
摘要:P1591 阶乘数码 只能説對高精度的理解還不夠,除了打板子但凡變成高精乘單精就懵逼了。 摘了一篇題解的代碼來理解 #include <bits/stdc++.h> using namespace std; int c[100000]; int main() { int t,n,a; cin>>t;
阅读全文 »
发表于 2023-09-26 17:37阅读次数:5评论次数:0
摘要:其實確實就一道模擬題,一開始覺得是搜索,後面看了一段時間題目知道了模擬,就開始瘋狂模擬,代碼不斷地優化可讀性和邏輯,感覺很不錯,但是輸出一直是零。 這是當時代碼 #include<iostream> #include<algorithm> using namespace std; struct mo
阅读全文 »
发表于 2023-09-22 17:32阅读次数:13评论次数:0
摘要:P4924 [1007] 魔法少女小Scarlet 对模拟题摸不着头脑。 看题解之后的源码 本来想把变量塞进for循环结果莫名re #include<bits/stdc++.h> #include<iostream> #include<cstdio> #include<algorithm> #inc
阅读全文 »
发表于 2023-09-06 16:02阅读次数:3评论次数:0
摘要:完全想不出来正解,暴力t了过不了 class Solution { public boolean isUgly(int n) { if (n == 1) { return true; } if (n <= 0) { return false; } outer:for(int i = 2; i < n
阅读全文 »
发表于 2023-09-04 19:55阅读次数:3评论次数:0
摘要:用很丑陋的递归做出来的 class Solution { public boolean isPowerOfTwo(int n) { if (n == 1) { return true; } if (n <= 0) { return false; } if(n % 2 != 0) { return f
阅读全文 »
发表于 2023-09-04 19:11阅读次数:6评论次数:0
摘要:没想到我现在能卡在这样的题目上 leetcode258各位相加 只尝试了循环模拟,一开始代码是这样的。 class Solution { public int addDigits(int num) { int temp; do { while(num != 0) { temp += num % 10
阅读全文 »
发表于 2023-09-04 19:04阅读次数:6评论次数:0
摘要:再冲击一次自己的上限吧 这几年失败遗憾太多了,无所谓,但唯独不想在oi上认输。 读了软工专业,从新开始,搞竞赛,刷题。 在此更新刷题记录
阅读全文 »