全部遍历后再输出-1 摘要:解题思路:注意cout出-1的位置,如果是在if下面,即意味着单次判断无x即直接-1,而实际上应该是全部遍历后再判断。注意事项:参考代码:#include<iostream> using names…… 题解列表 2024年12月10日 0 点赞 0 评论 208 浏览 评分:0.0
新手 与指定数字相同的数的个数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,m,a,i,k=0; scanf("%d %d",&n,&m); for(i=0;…… 题解列表 2024年12月11日 0 点赞 0 评论 242 浏览 评分:0.0
新手 入口增长问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i; double x; scanf("%lf %d",&x,&n); fo…… 题解列表 2024年12月11日 1 点赞 0 评论 290 浏览 评分:0.0
A+B for Input-Output Practice (I) 摘要:#include<stdio.h>int main(){ long long a,b; while(scanf("%lld %lld",&a,&b)!=EOF) { p…… 题解列表 2024年12月11日 0 点赞 0 评论 423 浏览 评分:0.0
下次一定好好看题再回答A+B for Input-Output Practice (V) 摘要:#include<stdio.h>int main(){ int n,d,m; scanf("%d",&n); for(int i=0; i<n; i++) { …… 题解列表 2024年12月11日 0 点赞 0 评论 290 浏览 评分:0.0
编写题解 1000: [竞赛入门]简单的a+b(Java版本) 摘要:```java //第一个程序,开始你的竞赛生涯吧!!!```java public class Main { public static void main(String[] args) {…… 题解列表 2024年12月11日 1 点赞 0 评论 1680 浏览 评分:0.0
[编程入门]链表合并 摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())s=[]for i in range(a+b): x=list(map(int,input().split(…… 题解列表 2024年12月11日 0 点赞 0 评论 508 浏览 评分:0.0
太Tm强了吧,haohao学,可以拿个省二的,牢弟!!!!!!!!! 摘要:解题思路:这段代码首先包含了iostream和iomanip头文件,iostream用于输入输出操作,iomanip用于设置输出格式。在main函数中,定义了两个double类型的变量F和C分别用于存…… 题解列表 2024年12月11日 1 点赞 0 评论 467 浏览 评分:0.0
数据结构-n阶Hanoi塔问题 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 全局变量k,用于记录移动步骤的编号 int k; void f(i…… 题解列表 2024年12月11日 0 点赞 0 评论 223 浏览 评分:0.0
3037: 棋盘问题 简单 DFS 入门题 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; #define ll long long int n,k; // 定义全局…… 题解列表 2024年12月12日 0 点赞 0 评论 268 浏览 评分:0.0