题解列表

筛选

简单明了的解题法

摘要:解题思路:注意事项:无参考代码:#include<stdio.h>#include<math.h>int primesum(int a)//判断是否为素数{ int m,n,sum,k=0; for(……

不是二分的写法不加以参考

```cpp#include#include#include#includeusingnamespacestd;typedeflonglongLL;constintN=100010;LLa[N];intn,m;intmain(){seth;intn;cin>>n;for(inti=0;i>a[i];h

查找最接近的元素二分

```cpp#include#include#includeusingnamespacestd;typedeflonglongLL;constintN=100010;LLa[N];intn,m;LLcheck(LLx){intl=0,r=n-1;if(x=a[r])returna[r];while(r

求长方形行面积问题,主要还是格式问题

摘要:注意事项: 1.输入的长和宽要在一行有空格隔开;                2.输出的周长和面积要是两行,且以C:和S:开头;                3.开头的C和S要是大写的,不然通不过……

c++ 筛选素数

摘要: #include using namespace std; int main() { int a; cin >> a; for( int i = 2; i ……

1784: 矩阵的对角线之和

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     int arr[5][5];     int ……