首页 > 仰望水面的歪
头像 佛系的青年
发表于 2025-03-10 20:34:05
将折射的光线以水面为对称 反转上去 刚好z的位置应该射到2*h-z 用int后面几个例子过不去 需要改成long #include <iostream> #include <vector> using namespace std; //欧几里得算法求最大公约数 long 展开全文
头像 番禺小韭菜
发表于 2025-03-02 12:37:02
#include <iostream> #include <vector> using namespace std; long gcd(long a, long b){ return b==0? a : gcd(b,a%b); } int main() { 展开全文
头像 玄骨
发表于 2025-10-22 16:05:40
#include<bits/stdc++.h> using namespace std; int gcd(int a,int b){ if(b==0){ return a; }else{ return gcd(b,a%b); } } 展开全文
头像 攀云
发表于 2025-04-26 12:32:49
#include <iostream> #include <vector> #include <numeric> using namespace std; long gcd3(long a, long b, long c) { return gcd( 展开全文
头像 星图史话
发表于 2025-10-22 11:36:42
//***只要你 目光是瞄准月亮 迷失过 又有何妨***// #include<bits/stdc++.h> using namespace std; using ll=long long; ll x,y,z; ll n,h; ll X,Y,Z; ll gcd(ll a,ll b) { 展开全文
头像 龍眠
发表于 2025-03-31 16:49:28
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); 展开全文
头像 asdukw
发表于 2025-03-30 16:41:51
#include <iostream> #include <vector> #include <string> #include <unordered_map> #include <algorithm> #include <cmath 展开全文
头像 英俊的回笼觉觉主在加班
发表于 2025-04-11 00:17:02
数据类型使用 long,int 类型只能过 2/3 的用例,排查了好久,怎么看都感觉代码没问题,就是过不了后面的用例,把 x,y,z 的数据类型全改成 long 就好了 import java.util.Scanner; public class Main { public static 展开全文
头像 ttkqwe
发表于 2025-10-22 09:58:45
直线经过两点 A(x_1, y_1, z_1) 与 B(x_2, y_2, z_2) 方向向量为两点间的差: #include <bits/stdc++.h> using namespace std; typedef long long ll; //水平面的高度h //小歪的 展开全文
头像 papybara
发表于 2025-08-07 15:18:23
from math import gcd import sys n,h = map(int,(input().split())) for line in sys.stdin: x,y,z = map(int,(line.split())) z = 2*h-z x,y,z = 展开全文