题解列表

筛选

已知三点求面积

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main(){ float x1, y1, x2, y2, x3, y3; scanf("%……

题解 1481剪刀石头布

摘要:解题思路:看到这个题目已知0代表石头,1代表布,2代表剪刀本题有三种结局1.甲胜乙负2.甲负乙胜3.平局第一种情况 甲出石头乙出剪刀甲出剪刀乙出布甲出布乙出石头第二种情况反之第三种情况 平局甲出石头乙……

石头剪刀布

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

归并排序(C++)

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; const int N = 1e5 + 10; int arr[N],tmp[N],……

平方差python解

摘要:解题思路:只有当x为奇数或4的倍数时才能拆分为两个数的平方差。注意事项:x-(x//2)求奇数的个数x//4求4的倍数的个数为了计算范围 [L, R] 内满足条件的数目,减去 f(L-1) 的目的是排……

用for放高度

摘要:解题思路:注意事项:参考代码:#include<stdio.h>void main(){ int i=0; int apple=0; int hig[10]; int sh; for(;i<10;i+……