排座椅[NOIP2008 年普及组]的解决办法 摘要:解题思路:这道题一开始的想法可能是暴力枚举,通过每一次遍历横切一刀或者竖切一刀,然后根据每次切完后的剩余“交头接耳”同学组数来打擂台,直到找到最小的一组,然后输出相应的切法。但这个方法实在太过麻烦,因…… 题解列表 2024年10月30日 0 点赞 0 评论 429 浏览 评分:9.9
1762: printf基础练习题解 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int main() { int a = 123456789; …… 题解列表 2024年10月30日 1 点赞 0 评论 985 浏览 评分:0.0
数组插入处理,初学者也能看懂 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main(){ int a[100],b,c,d=1; for(b=1;b<=9;b++){ …… 题解列表 2024年10月30日 0 点赞 0 评论 423 浏览 评分:0.0
打印平行四边形,简单方法 摘要:解题思路:注意事项:参考代码:#includeint main(){ int a,b,c,d; scanf("%d",&a); for(b=a;b>0;b--){//打印a行 …… 题解列表 2024年10月29日 0 点赞 0 评论 375 浏览 评分:0.0
[信息学奥赛一本通T1547-区间和]-分块写法 摘要:# 基于**分块思想**的区间查询与单点修改问题 ## 一、题目分析 题目要求实现两个操作: 1. 单点修改:将数组中某个元素增加一个值。 2. 区间查询:查询数组中某个区间的元素和。 …… 题解列表 2024年10月29日 0 点赞 0 评论 387 浏览 评分:9.9
蓝桥杯2024年第十五届省赛真题-好数 摘要: ``` #include int haoshu(int num){ for (int i = 0; num!=0; i++) { int t=nu…… 题解列表 2024年10月29日 2 点赞 0 评论 312 浏览 评分:0.0
2783: 判断是否为两位数(新手解法) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a; scanf("%d",&a); if(a>=10&&a<99) { …… 题解列表 2024年10月29日 0 点赞 0 评论 427 浏览 评分:0.0
使用sort函数排序 摘要:解题思路:使用sort函数直接排序然后相减把结果相加注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool compare(int a,in…… 题解列表 2024年10月29日 0 点赞 0 评论 485 浏览 评分:7.3
开心的金明-背包问题解法 摘要:解题思路:可归纳为背包问题注意事项:放入二维数组的是单件物品*权重参考代码:#include<stdio.h>int max(int a,int b){ int max=0; max = …… 题解列表 2024年10月29日 0 点赞 0 评论 523 浏览 评分:0.0
2847 找第一个只出现一次的字符(gets) 摘要:解题思路:注意事项:参考代码#include <stdio.h>#include <string.h>int main() { char arr[100001], ch; int i, j…… 题解列表 2024年10月29日 0 点赞 0 评论 467 浏览 评分:0.0