摘要: 题目内容 给定$n$组数据$a_i, b_i, m_i$, 对于每组数据求出一个$x_i$,使其满足$a_i \times x_i \equiv b_i(mod \ m_i)$ 如果无解则输出impossible 输入格式 第一行包含整数 \(n\),接下来$n$行,每行包含一组数据$ a_i, b 阅读全文
posted @ 2022-06-21 16:24 Maple1234 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 首先我们来看一下这道题目: 相信许多人对这道题目并不陌生,在刚开始学习编程的时候,我们总能在习题库中看到它,如何解决呢,代码很简单: #include <stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); printf("%d\n",a+b 阅读全文
posted @ 2020-03-12 21:43 Maple1234 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 一、 步骤 引入头文件: #include <time.h> 或者#include <ctime> 定义: clock_t start1, end1 (clock_t是用来保存时间的数据类型) 把start放在测试程序结束前: start1 = clock(); 把end放在测试程序结束处: end 阅读全文
posted @ 2020-01-25 11:27 Maple1234 阅读(1555) 评论(0) 推荐(0) 编辑
摘要: 一 选择排序 对于一般的选择排序,对于我们来说已经很熟悉了,代码如下: void _sort(int a[],int n)//从小到大排序 { int i,j,temp; for(i=0;i<n-1;i++) { for(j=i+1;j<n;j++) { if(a[i]>a[j]) { temp=a 阅读全文
posted @ 2020-01-13 21:26 Maple1234 阅读(190) 评论(0) 推荐(0) 编辑