题解列表

筛选

杨辉三角(C++)简单易懂

摘要:参考代码:#include <iostream>using namespace std;int main() {    int n;    while (cin >> n) {        // 使……

回文串(C++)简单易懂

摘要:参考代码:#include <iostream>#include <string>using namespace std;bool isPalindrome(string str) {    int ……

同行列对角线的格子(C++代码解析与题解)

摘要:代码解析:在 main 函数中,我们首先输入三个整数 N、i 和 j,分别表示方格的大小和给定位置的行号和列号。然后,使用循环输出与给定位置同行的格子位置。遍历从 1 到 N 的每一列,输出格子位置 ……

石头剪刀布

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    //比赛n轮,输入n ,小A的周期长度na,小B的周……

石头剪刀布

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    //比赛n轮,输入n ,小A的周期长度na,小B的周……

2821: 开关灯

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int a[10000000];int main(){    int n,m;  ……

3020: 最大数位置

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[100000];int main(){    int n,maxx=1,……