首页
比赛
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
仰望水面的歪
22条解析
开通博客写题解
佛系的青年
发表于 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-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-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
展开全文
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 =
展开全文
忙碌的小冤种在刷代码
发表于 2025-08-02 21:15:54
import math n, h = map(int, input().split()) for _ in range(n): x, y, z = map(int, input().split()) z_mirror = 2 * h - z g = math.gcd(mat
展开全文
永夏360
发表于 2025-05-14 23:07:51
#include <iostream> using namespace std; #include<cmath> int gcd(long int a, long int b) { if(b == 0) { return a; } re
展开全文
无敌小葵大王
发表于 2025-04-09 20:57:31
#include<bits/stdc++.h> using namespace std; int main(){ int n,h;cin>>n>>h; long long x,y,z; for(int i=0;i<n;i++){ scanf(&
展开全文
查看本题
查看本题讨论
相关比赛
96115-牛客周赛 Round 69
进入比赛
96901-牛客周赛69内测
进入比赛
97564-实验室模拟赛11.26
进入比赛
97636-Tjrac12.1下午训练赛
进入比赛
98143-中原工学院软件学院新生赛
进入比赛
等你来战
查看全部
牛客小白月赛120
报名截止时间:2025-09-05 21:00
牛客周赛 Round 108
报名截止时间:2025-09-07 21:00
牛客练习赛144
报名截止时间:2025-09-12 21:30
牛客周赛 Round 109
报名截止时间:2025-09-14 21:00
牛客挑战赛82
报名截止时间:2025-09-19 22:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题