735 字 1 分鐘

# 題目 APCS 模擬團隊 OJ apcs0404-C-CPP: 顯卡爭霸戰 (Graphics Card Battle) # 解題思路 #include<bits/stdc++.h>using namespace std;#define Rabbir_Reaper ios_base::sync_with_stdio(0); cin.tie(0);int find(int x,vector<int> &boss){ if(boss[x] < 0) return x; return boss[x] =...
776 字 1 分鐘

# 題目 APCS 模擬團隊 OJ apcs0403 愛吃字母的怪獸 (Alphabet Monster) # 解題思路 目前沒東西... # 程式碼 #include<bits/stdc++.h>using namespace std;#define Rabbir_Reaper ios_base::sync_with_stdio(0); cin.tie(0);#define int long longconst int N = 2e5 + 5;string c;unordered_map<char,pair<int,int>>...
554 字 1 分鐘

# 題目 APCS 模擬團隊 OJ apcs0303 礦坑 (Mine) # 解題思路 目前沒東西... # 程式碼 #include<bits/stdc++.h>using namespace std;#define Rabbir_Reaper ios_base::sync_with_stdio(0); cin.tie(0);int main(){ Rabbir_Reaper int n,k; cin>>n>>k; queue<int> dis; for(int...
671 字 1 分鐘

# 題目 APCS 模擬團隊 OJ apcs0304-cpp: 調酒專家 (Mixologist) # 解題思路 目前沒東西... # 程式碼 #include<bits/stdc++.h>using namespace std;typedef long long LL;#define Rabbir_Reaper ios_base::sync_with_stdio(0); cin.tie(0);const int N = 2000 + 5;LL dp[N][N];int main(){ Rabbir_Reaper int n,m;...
1.3k 字 1 分鐘

# 題目 APCS 模擬團隊 OJ apcs0204: 逃脫遊戲 (Game) # 解題思路 目前沒東西... # 程式碼 #include <bits/stdc++.h>using namespace std;#define Rabbir_Reaper ios_base::sync_with_stdio(0); cin.tie(0);const int N = 250 +5;int dir[4][2]=...
545 字 1 分鐘

# 題目 APCS 模擬團隊 OJ apcs0203:S 盒模擬 (S-BOX-Simulate) # 解題思路 目前沒東西... # 程式碼 #include<bits/stdc++.h>using namespace std;#define Rabbir_Reaper ios_base::sync_with_stdio(0); cin.tie(0);int main(){ Rabbir_Reaper int n,m; cin>>n>>m; vector<int> v[4]; for(int...
2.3k 字 2 分鐘

# 題目 APCS 模擬團隊 OJ apcs0103 樹裡資優班 (Tree Gifted Class) # 解題思路 目前沒東西... # 程式碼 #include<bits/stdc++.h>using namespace std;#define Rabbir_Reaper ios_base::sync_with_stdio(0); cin.tie(0);const int N = 1e5+5;vector<int> adj[N];string s;int parent[N],now;int main(){...
627 字 1 分鐘

# 題目 APCS 模擬團隊 OJ apcs0104 排隊 (Queue) # 解題思路 目前沒東西... # 程式碼 #include<bits/stdc++.h>using namespace std;#define Rabbir_Reaper ios_base::sync_with_stdio(0); cin.tie(0);const int N = 1e5 + 5;set<int> adj[N];int indeg[N];int main(){ Rabbir_Reaper int n;...
934 字 1 分鐘

# 題目 AP325 Q-2-10. 子集合的和 (折半枚舉) # 解題思路 目前沒東西... # 程式碼 #include<bits/stdc++.h>using namespace std;#define Rabbir_Reaper ios_base::sync_with_stdio(0); cin.tie(0);typedef long long LL;LL p,mx;//recursive generate sum of subsetsvoid rgs(vector<LL> &v,int idx,LL...
797 字 1 分鐘

# 題目 zerojudge c889. 2. 二分圖 # 解題思路 目前沒東西... # 程式碼 #include <bits/stdc++.h>using namespace std;#define Rabbir_Reaper ios::sync_with_stdio(0);cin.tie();#define N 100005vector<int> adj[N];int visit[N];int black,white,tblack,twhite;void dfs(int pos){ if(visit[pos]==1)...