首页
比赛
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
仰望水面的歪
17条解析
开通博客写题解
佛系的青年
发表于 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(
展开全文
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
展开全文
龍眠
发表于 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);
展开全文
永夏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(&
展开全文
牛客94987038号
发表于 2025-04-02 11:29:03
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner in =
展开全文
不要为打翻的牛奶哭泣
发表于 2025-04-05 13:35:20
将折射的光线以水面为对称 反转上去 刚好z的位置应该射到2*h-z用int后面几个例子过不去 需要改成long #include <iostream> #include <vector> using namespace std; long gcd(long a, long
展开全文
查看本题
查看本题讨论
相关比赛
96115-牛客周赛 Round 69
进入比赛
96901-牛客周赛69内测
进入比赛
97564-实验室模拟赛11.26
进入比赛
97636-Tjrac12.1下午训练赛
进入比赛
98143-中原工学院软件学院新生赛
进入比赛
等你来战
查看全部
牛客周赛 Round 98
报名截止时间:2025-06-29 21:00
金山杯2025年武汉理工大学程序设计竞赛
报名截止时间:2025-06-30 15:00
牛客小白月赛119
报名截止时间:2025-07-04 21:00
牛客周赛 Round 99
报名截止时间:2025-07-06 21:00
牛客练习赛142
报名截止时间:2025-07-11 21:30
牛客周赛 Round 100
报名截止时间:2025-07-13 21:00
2025牛客暑期多校训练营1
报名截止时间:2025-07-15 17:00
2025牛客暑期多校训练营2
报名截止时间:2025-07-17 17:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题