<C/C++算法>九度OJ题目1151--1200解题练习(五)

AI编程工具选哪个更高效?开发者深度评测 无论是代码生成、错误修复,还是架构设计,AI都能提供强大的辅助能力。然而,市面上AI编程工具众多,如何选择最适合自己的?本文将从代码质量、响应速度、多语言支持、集成能力等多个维度,为你解析2025年最主流的几款AI编程工具,帮助你做出更高效的选择。根据2025年最新调研数据,全球超过85%的开发者正在使用AI编程工具辅助开发,相比2023年增长了近40%。合理利用AI,能让你的开发效率提升数倍,但真正的核心竞争力,仍然在于你的编程思维和解决问题的能力。:技术较强的开发者、重视数据隐私的企业。 阅读详情

From:http://blog.youkuaiyun.com/ebowtang/article/details/38277903


题目1151:位操作练习

题目描述:

给出两个不大于65535的非负整数,判断其中一个的16位二进制表示形式,是否能由另一个的16位二进制表示形式经过循环左移若干位而得到。

循环左移和普通左移的区别在于:最左边的那一位经过循环左移一位后就会被移到最右边去。比如:
1011 0000 0000 0001 经过循环左移一位后,变成 0110 0000 0000 0011, 若是循环左移2位,则变成 1100 0000 0000 0110

输入:

第一行是个整数n, 0 < n < 300000,表示后面还有n行数据
后面是n行,每行有两个不大于65535的非负整数

输出:

对于每一行的两个整数,输出一行,内容为YES或NO

样例输入:
4
2 4
9 18
45057 49158
7 12
样例输出:
YES
YES
YES
NO


题目1153:括号匹配问题

题目描述:

在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$"标注,不能匹配的右括号用"?"标注.

输入:

输入包括多组数据,每组数据一行,包含一个字符串,只包含左右括号和大小写字母,字符串长度不超过100。
注意:cin.getline(str,100)最多只能输入99个字符!

输出:

对每组输出数据,输出两行,第一行包含原始输入字符,第二行由"$","?"和空格组成,"$"和"?"表示与之对应的左括号和右括号不能匹配。

样例输入:
)(rttyy())sss)(
样例输出:
)(rttyy())sss)(
?            ?$

  1. #include "iostream"
  2. #include "string"
  3. #include "stack"
  4. using namespace std;
  5. void BracketMatch(const string srcStr);
  6. int main()
  7. {
  8. string str;
  9. while (cin >> str)
  10. {
  11. cout << str << endl;
  12. BracketMatch(str);
  13. }
  14. return 0;
  15. }
  16. void BracketMatch(const string srcStr)
  17. {
  18. stack<int> s;
  19. string ansStr(srcStr.length(),'0');
  20. for (unsigned int i = 0; i < srcStr.length(); i++)//从左往右开始遍历
  21. {
  22. if (isalpha(srcStr[i]))
  23. {
  24. ansStr[i]=' ';
  25. continue;
  26. }
  27. switch (srcStr[i])
  28. {
  29. //对左括号仅作压栈处理,也就是说栈中只可能是左括号
  30. case '(':
  31. if (i != (srcStr.length() - 1))//当是最后一个字符时已经没有必要输出空格了
  32. ansStr[i] = ' ';
  33. s.push(i);//注意,这里
  34. break;
  35. //对右括号做匹配判断
  36. case ')':
  37. if (!s.empty())
  38. {//如果不为空,说明一定有左括号(实际上是其数组下标)
  39. s.pop();
  40. ansStr[i] = ' ';
  41. }
  42. else//如果为空
  43. ansStr[i] = '?';
  44. break;
  45. default:
  46. cerr << "错误的括号" << endl;
  47. }
  48. }
  49. while (!s.empty())
  50. { //解决多余的左括号
  51. ansStr[s.top()] = '$';
  52. s.pop();
  53. }
  54. cout << ansStr << endl;
  55. }
  56. /**************************************************************
  57. Problem: 1153
  58. User: EbowTang
  59. Language: C++
  60. Result: Accepted
  61. Time:10 ms
  62. Memory:1524 kb
  63. ****************************************************************/
#include "iostream"  
#include "string"  
#include "stack"  
 
using namespace std;
 
void BracketMatch(const string srcStr);
int main()
{
    string str;
    while (cin >> str)
    {
        cout << str << endl;
        BracketMatch(str);
    }
    return 0;
}
 
void BracketMatch(const string srcStr)
{
    stack<int> s;
    string ansStr(srcStr.length(),'0');
    for (unsigned int i = 0; i < srcStr.length(); i++)//从左往右开始遍历  
    {
        if (isalpha(srcStr[i]))
        {
            ansStr[i]=' ';
            continue;
        }
        switch (srcStr[i])
        {
                //对左括号仅作压栈处理,也就是说栈中只可能是左括号  
            case '(':
                if (i != (srcStr.length() - 1))//当是最后一个字符时已经没有必要输出空格了
                    ansStr[i] = ' ';
                s.push(i);//注意,这里
                break;
 
                //对右括号做匹配判断
            case ')':
                if (!s.empty())
                {//如果不为空,说明一定有左括号(实际上是其数组下标)
                    s.pop();
                    ansStr[i] = ' ';
                }
                else//如果为空
                    ansStr[i] = '?';
                break;
 
            default:
                cerr << "错误的括号" << endl;
        }
    }
    while (!s.empty())
    {  //解决多余的左括号  
        ansStr[s.top()] = '$';
        s.pop();
    }
    cout << ansStr << endl;
}
/**************************************************************
    Problem: 1153
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:10 ms
    Memory:1524 kb
****************************************************************/


题目1156:谁是你的潜在朋友

题目描述:

“臭味相投”——这是我们描述朋友时喜欢用的词汇。两个人是朋友通常意味着他们存在着许多共同的兴趣。然而作为一个宅男,你发现自己与他人相互了解的机会并不太多。幸运的是,你意外得到了一份北大图书馆的图书借阅记录,于是你挑灯熬夜地编程,想从中发现潜在的朋友。
首先你对借阅记录进行了一番整理,把N个读者依次编号为1,2,…,N,把M本书依次编号为1,2,…,M。同时,按照“臭味相投”的原则,和你喜欢读同一本书的人,就是你的潜在朋友。你现在的任务是从这份借阅记录中计算出每个人有几个潜在朋友。

输入:

每个案例第一行两个整数N,M,2 <= N ,M<= 200。接下来有N行,第i(i = 1,2,…,N)行每一行有一个数,表示读者i-1最喜欢的图书的编号P(1<=P<=M)

输出:

每个案例包括N行,每行一个数,第i行的数表示读者i有几个潜在朋友。如果i和任何人都没有共同喜欢的书,则输出“BeiJu”(即悲剧,^ ^)

样例输入:
4  5
2
3
2
1
样例输出:
1
BeiJu
1
BeiJu
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. int findK(int key,int A[],int s,int n){
  5. int count = 1;
  6. for (int i = s + 1; i < n; i++){
  7. if (A[i]==key){
  8. count++;
  9. }
  10. }
  11. return count;
  12. }
  13. int pCount[200];
  14. int f[1000];
  15. int main(){
  16. int N, M;
  17. int key;
  18. while (cin >> N >> M){
  19. memset(pCount, 0, 200 * sizeof(int));
  20. for (int i = 0; i < N; i++){
  21. cin >> key;
  22. pCount[key]++;
  23. f[i] = key;
  24. }
  25. for (int i = 0; i < N; i++){
  26. key = f[i];
  27. if (pCount[key] == 1)
  28. cout << "BeiJu" << endl;
  29. else
  30. cout << pCount[key]-1<< endl;
  31. }
  32. }
  33. return 0;
  34. }
  35. /**************************************************************
  36. Problem: 1156
  37. User: EbowTang
  38. Language: C++
  39. Result: Accepted
  40. Time:10 ms
  41. Memory:1524 kb
  42. ****************************************************************/
#include <iostream>
#include <cstring>
using namespace std;
 
int findK(int key,int A[],int s,int n){
    int count = 1;
    for (int i = s + 1; i < n; i++){
        if (A[i]==key){
            count++;
        }
    }
    return count;
}
 
int pCount[200];
 
int f[1000];
 
int main(){
 
     
    int N, M;
    int key;
    while (cin >> N >> M){
        memset(pCount, 0, 200 * sizeof(int));
        for (int i = 0; i < N; i++){
            cin >> key;
            pCount[key]++;
            f[i] = key;
        }
        for (int i = 0; i < N; i++){
            key = f[i];
            if (pCount[key] == 1)
                cout << "BeiJu" << endl;
            else
                cout << pCount[key]-1<< endl;
        }
    }
 
 
    return 0;
}
/**************************************************************
    Problem: 1156
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:10 ms
    Memory:1524 kb
****************************************************************/


题目1169:比较奇偶数个数

题目描述:

第一行输入一个数,为n,第二行输入n个数,这n个数中,如果偶数比奇数多,输出NO,否则输出YES。

输入:

输入有多组数据。
每组输入n,然后输入n个整数(1<=n<=1000)。

输出:

如果偶数比奇数多,输出NO,否则输出YES。

样例输入:
5
1 5 2 4 3
样例输出:
YES
  1. #include "vector"
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6. int n = 0;
  7. while (cin >> n)
  8. {
  9. vector<int> vec(n);
  10. int count = 0;
  11. for (int i = 0; i < n; i++)
  12. {
  13. cin >> vec[i];
  14. if (vec[i] % 2 == 1)
  15. count++;
  16. }
  17. if (count < (n - count))
  18. cout << "NO" << endl;
  19. else
  20. cout << "YES" << endl;
  21. }
  22. return 0;
  23. }
  24. /**************************************************************
  25. Problem: 1169
  26. User: EbowTang
  27. Language: C++
  28. Result: Accepted
  29. Time:10 ms
  30. Memory:1520 kb
  31. ****************************************************************/

题目1170:找最小数

题目描述:

第一行输入一个数n,1 <= n <= 1000,下面输入n行数据,每一行有两个数,分别是x y。输出一组x y,该组数据是所有数据中x最小,且在x相等的情况下y最小的。

输入:

输入有多组数据。
每组输入n,然后输入n个整数对。

输出:

输出最小的整数对。

样例输入:
5  
3 3  
2 2  
5 5  
2 1  
3 6
样例输出:
2 1
  1. #include <iostream>
  2. #include "algorithm"
  3. using namespace std;
  4. typedef struct _Point
  5. {
  6. int x;
  7. int y;
  8. }Point;
  9. bool cmpPoint(Point a, Point b)
  10. {
  11. if (a.x != b.x)
  12. return a.x < b.x;
  13. else
  14. return a.y<b.y;
  15. }
  16. int main(void)
  17. {
  18. int n = 0;
  19. while (cin>>n)
  20. {
  21. Point w[1000];
  22. for (size_t i = 0; i < n; i++)
  23. cin >> w[i].x >> w[i].y;
  24. //多关键字排序
  25. sort(w, w + n, cmpPoint);//功能是先排x,若相等则在其基础上对y进行排序。
  26. //输出最小点
  27. cout << w[0].x << " " << w[0].y << endl;
  28. }
  29. return 0;
  30. }
  31. /**************************************************************
  32. Problem: 1170
  33. User: EbowTang
  34. Language: C++
  35. Result: Accepted
  36. Time:10 ms
  37. Memory:1520 kb
  38. ****************************************************************/
#include <iostream>
#include "algorithm"
 
using namespace std;
 
typedef struct _Point
{
    int x;
    int y;
}Point;
 
bool cmpPoint(Point a, Point b)
{
    if (a.x != b.x)
        return a.x < b.x;
    else
        return a.y<b.y;
}
 
int main(void)
{
    int n = 0;
    while (cin>>n)
    {
        Point w[1000];
        for (size_t i = 0; i < n; i++)
            cin >> w[i].x >> w[i].y;
        //多关键字排序
        sort(w, w + n, cmpPoint);//功能是先排x,若相等则在其基础上对y进行排序。
        //输出最小点
        cout << w[0].x << " " << w[0].y << endl;
    }
    return 0;
}
/**************************************************************
    Problem: 1170
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:10 ms
    Memory:1520 kb
****************************************************************/

题目1180:对称矩阵

题目描述:

输入一个N维矩阵,判断是否对称。

输入:

输入第一行包括一个数:N(1<=N<=100),表示矩阵的维数。
接下来的N行,每行包括N个数,表示N*N矩阵的元素。

输出:

可能有多组测试数据,对于每组数据,
输出"Yes!”表示矩阵为对称矩阵。
输出"No!”表示矩阵不是对称矩阵。

样例输入:
4
16 19 16 6 
19 16 14 5 
16 14 16 3 
6 5 3 16 
2
1 2
3 4
样例输出:
Yes!
No!
  1. #include <iostream>
  2. #include "algorithm"
  3. using namespace std;
  4. int main()
  5. {
  6. int n = 0;
  7. while (cin>>n)
  8. {
  9. //vector<vector<int>> array(n);//定义二维数组
  10. //for (int i = 0; i <n; i++)
  11. // array[i].resize(n);//注意:必须设置二维数组的列数,即每一行有多少个元素
  12. //array[2][1] = 12;//将第三行的第二个元素初始化为12
  13. int **array=new int*[n];
  14. for (int i = 0; i < n; i++)
  15. array[i] = new int[n];
  16. for (int i = 0; i < n; i++)
  17. {
  18. for (int j = 0; j < n; j++)
  19. {
  20. cin >> array[i][j];//一行一行获取数据
  21. }
  22. }
  23. bool flag = false;
  24. for (int i = 0; i < n; i++)
  25. {
  26. for (int j = 0; j < n; j++)
  27. {
  28. if (array[i][j] != array[j][i])//对称的位置上必须相等
  29. flag = true;
  30. }
  31. if (flag)
  32. break;
  33. }
  34. if (flag)
  35. cout << "No!" << endl;
  36. else
  37. cout << "Yes!" << endl;
  38. }
  39. }
  40. /**************************************************************
  41. Problem: 1180
  42. User: EbowTang
  43. Language: C++
  44. Result: Accepted
  45. Time:50 ms
  46. Memory:1916 kb
  47. ****************************************************************/

题目1182:统计单词

题目描述:

编一个程序,读入用户输入的,以“.”结尾的一行文字,统计一共有多少个单词,并分别输出每个单词含有多少个字符。
(凡是以一个或多个空格隔开的部分就为一个单词)

输入:

输入包括1行字符串,以“.”结束,字符串中包含多个单词,单词之间以一个或多个空格隔开。

输出:

可能有多组测试数据,对于每组数据,
输出字符串中每个单词包含的字母的个数。

样例输入:
hello how are you.
样例输出:
5 3 3 3
  1. #include "stdio.h"
  2. #include "vector"
  3. #include "string"
  4. #include "iostream"
  5. using namespace std;
  6. int main()
  7. {
  8. string str;
  9. while (getline(cin,str))
  10. {
  11. for (size_t i = 0; i < str.length(); i++)
  12. {
  13. int count = 0;
  14. //while (str[i] <= 'z' && str[i] >= 'a' || str[i] <= 'Z' && str[i] >= 'A')
  15. while (isalpha(str[i]))
  16. {//只要是字母就统计
  17. count++;
  18. i++;
  19. }
  20. if (count)//防止多个空格
  21. {
  22. if (i==(str.length()-1))
  23. cout << count;
  24. else
  25. cout << count<<" ";
  26. }
  27. }
  28. cout << endl;
  29. }
  30. return 0;
  31. }
  32. /**************************************************************
  33. Problem: 1182
  34. User: EbowTang
  35. Language: C++
  36. Result: Accepted
  37. Time:20 ms
  38. Memory:1520 kb
  39. ****************************************************************/
#include "stdio.h"
#include "vector"
#include "string"
#include "iostream"
using namespace std;
 
int main()
{
    string str;
    while (getline(cin,str))
    {
        for (size_t i = 0; i < str.length(); i++)
        {
            int count = 0;
            //while (str[i] <= 'z' && str[i] >= 'a' || str[i] <= 'Z' && str[i] >= 'A')
            while (isalpha(str[i]))
            {//只要是字母就统计
                count++;
                i++;
            }
            if (count)//防止多个空格
            {
                if (i==(str.length()-1))
                    cout << count;
                else
                    cout << count<<" ";
            }
        }
        cout << endl;
    }
    return 0;
}
 
/**************************************************************
    Problem: 1182
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:20 ms
    Memory:1520 kb
****************************************************************/


题目1183:守形数

题目描述:

守形数是这样一种整数,它的平方的低位部分等于它本身。
比如25的平方是625,低位部分是25,因此25是一个守形数。
编一个程序,判断N是否为守形数。

输入:

输入包括1个整数N,2<=N<100。

输出:

可能有多组测试数据,对于每组数据,
输出"Yes!”表示N是守形数。
输出"No!”表示N不是守形数。

样例输入:
25
4
样例输出:
Yes!
No!
  1. #include "vector"
  2. #include "string"
  3. #include <iostream>
  4. #include "algorithm"
  5. #include<stdio.h>
  6. using namespace std;
  7. int main()
  8. {
  9. int n, m, f;
  10. while (scanf("%d", &n) != EOF)
  11. {
  12. if(n<2||n>=100)
  13. break;
  14. m = n;
  15. n = n*n;
  16. if (n % 1000 == m)
  17. printf("Yes!\n");
  18. else if (n % 100 == m)
  19. printf("Yes!\n");
  20. else if (n % 10 == m)
  21. printf("Yes!\n");
  22. else
  23. printf("No!\n");
  24. }
  25. return 0;
  26. }
  27. /**************************************************************
  28. Problem: 1183
  29. User: EbowTang
  30. Language: C++
  31. Result: Accepted
  32. Time:0 ms
  33. Memory:1520 kb
  34. ****************************************************************/
#include "vector"
#include "string"
#include <iostream>
#include "algorithm"
#include<stdio.h>
using namespace std;
 
int main()
{
    int n, m, f;
    while (scanf("%d", &n) != EOF)
    {
        if(n<2||n>=100) 
            break;
        m = n;
        n = n*n;
        if (n % 1000 == m)
            printf("Yes!\n");
        else if (n % 100 == m) 
            printf("Yes!\n");
        else if (n % 10 == m)  
            printf("Yes!\n");
        else
            printf("No!\n");
    }
 
    return 0;
}
/**************************************************************
    Problem: 1183
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:0 ms
    Memory:1520 kb
****************************************************************/


题目1184:二叉树遍历

题目描述:

编一个程序,读入用户输入的一串先序遍历字符串,根据此字符串建立一个二叉树(以指针方式存储)。
例如如下的先序遍历字符串:
ABC##DE#G##F###
其中“#”表示的是空格,空格字符代表空树。建立起此二叉树以后,再对二叉树进行中序遍历,输出遍历结果。

输入:

输入包括1行字符串,长度不超过100。

输出:

可能有多组测试数据,对于每组数据,
输出将输入字符串建立二叉树后中序遍历的序列,每个字符后面都有一个空格。
每个输出结果占一行。

样例输入:
abc##de#g##f###
样例输出:
c b e g d f a 
  1. #include "string"
  2. #include "algorithm"
  3. #include <iostream>
  4. #include "stack"
  5. #include <cmath>
  6. #include <set>
  7. using namespace std;
  8. string preStr;
  9. // 节点定义
  10. class BSTNode
  11. {
  12. public:
  13. BSTNode()// 默认构造
  14. {
  15. pRight = NULL;
  16. pLeft = NULL;
  17. value = 0;
  18. }
  19. ~BSTNode();
  20. friend class LinkBST;// 允许链表类随意访问节点数据
  21. private:
  22. char value;
  23. BSTNode *pRight;
  24. BSTNode *pLeft;
  25. };
  26. // 无头结点的二叉树定义
  27. class LinkBST
  28. {
  29. public:
  30. LinkBST(){};
  31. ~LinkBST(){};
  32. // 根据字符串重建二叉树
  33. void ReBuildTree(BSTNode *&pNode, int &index);
  34. // 中序遍历
  35. void InOrder(BSTNode *&pRoot);
  36. };
  37. // 中序遍历
  38. void LinkBST::InOrder(BSTNode *&pNode)
  39. {
  40. if (pNode != NULL)
  41. {
  42. InOrder(pNode->pLeft);
  43. cout << pNode->value << " ";
  44. InOrder(pNode->pRight);
  45. }
  46. }
  47. // 根据前序字符串重建二叉树
  48. void LinkBST::ReBuildTree(BSTNode *&pNode, int &index)
  49. {
  50. if (index == preStr.size())
  51. return;
  52. if (preStr[index] == '#')
  53. {
  54. pNode = NULL;
  55. index++;
  56. }
  57. else
  58. {
  59. pNode = new BSTNode;
  60. pNode->value = preStr[index];
  61. index++;
  62. ReBuildTree(pNode->pLeft, index);//总是先建完左子树,再建右子树
  63. ReBuildTree(pNode->pRight, index);
  64. }
  65. }
  66. /*
  67. a
  68. / \
  69. b #
  70. / \
  71. c d <------本例题的二叉树逻辑结构
  72. / \ / \
  73. # # e f
  74. / \ / \
  75. # g # #
  76. / \
  77. # #
  78. */
  79. int main()
  80. {
  81. while (cin >> preStr)
  82. {
  83. BSTNode *pRoot = NULL;
  84. LinkBST bst;
  85. int index = 0;
  86. bst.ReBuildTree(pRoot,index);
  87. bst.InOrder(pRoot);
  88. cout << endl;
  89. }
  90. }
#include "string"
#include "algorithm"
#include <iostream>
#include "stack"
#include <cmath>
#include <set>

using namespace std;

string preStr;

// 节点定义
class BSTNode
{
public:
	BSTNode()// 默认构造
	{
		pRight = NULL;
		pLeft = NULL;
		value = 0;
	}
	~BSTNode();
	friend class LinkBST;// 允许链表类随意访问节点数据

private:
	char value;
	BSTNode *pRight;
	BSTNode *pLeft;
};

// 无头结点的二叉树定义 
class LinkBST
{
public:
	LinkBST(){};
	~LinkBST(){};

	// 根据字符串重建二叉树
	void ReBuildTree(BSTNode *&pNode, int &index);

	// 中序遍历
	void InOrder(BSTNode *&pRoot);
	
};

// 中序遍历
void LinkBST::InOrder(BSTNode *&pNode)
{
	if (pNode != NULL)
	{
		InOrder(pNode->pLeft);
		cout << pNode->value << " ";
		InOrder(pNode->pRight);
	}
}

// 根据前序字符串重建二叉树
void LinkBST::ReBuildTree(BSTNode *&pNode, int &index)
{
	if (index == preStr.size())
		return;
	if (preStr[index] == '#')
	{
		pNode = NULL;
		index++;
	}
	else
	{
		pNode = new BSTNode;
		pNode->value = preStr[index];
		index++;
		ReBuildTree(pNode->pLeft, index);//总是先建完左子树,再建右子树
		ReBuildTree(pNode->pRight, index);
	}
}


/*
           a
		  / \
         b   #
		/  \
       c    d        <------本例题的二叉树逻辑结构
	  / \  /  \
     #  # e    f
	     / \  / \
		#   g #  #
		   / \
		  #   #
*/


int main()
{
	while (cin >> preStr)
	{
		BSTNode *pRoot = NULL;
		LinkBST bst;
		int index = 0;
		bst.ReBuildTree(pRoot,index);
		bst.InOrder(pRoot);
		cout << endl;
	}
}



题目1185:特殊排序

题目描述:

输入一系列整数,将其中最大的数挑出,并将剩下的数进行排序。

输入:
输入第一行包括1个整数N,1<=N<=1000,代表输入数据的个数。
接下来的一行有N个整数。
输出:
可能有多组测试数据,对于每组数据,
第一行输出一个整数,代表N个整数中的最大值,并将此值从数组中去除,将剩下的数进行排序。
第二行将排序的结果输出。
样例输入:
4
1 3 4 2
样例输出:
4
1 2 3
提示:

如果数组中只有一个数,当第一行将其输出后,第二行请输出"-1"。

  1. #include "vector"
  2. #include "string"
  3. #include "algorithm"
  4. #include <iostream>
  5. #include "stack"
  6. using namespace std;
  7. int main()
  8. {
  9. int n = 0;
  10. while (cin >> n)
  11. {
  12. vector<int> vec(n);
  13. if (n >= 2)
  14. {
  15. for (int i = 0; i < n; i++)
  16. cin >> vec[i];
  17. sort(vec.begin(), vec.end());
  18. cout << vec[n - 1] << endl;
  19. for (int i = 0; i < n - 2; i++)
  20. cout << vec[i] << " ";
  21. cout << vec[n - 2] << endl;
  22. }
  23. else
  24. {
  25. int val = 0;
  26. cin >> val;
  27. cout << val << endl << -1 << endl;
  28. }
  29. }
  30. }
  31. /**************************************************************
  32. Problem: 1185
  33. User: EbowTang
  34. Language: C++
  35. Result: Accepted
  36. Time:50 ms
  37. Memory:1520 kb
  38. ****************************************************************/
#include "vector"
#include "string"
#include "algorithm"
#include <iostream>
#include "stack"
 
using namespace std;
 
int main()
{
    int n = 0;
    while (cin >> n)
    {
        vector<int> vec(n);
        if (n >= 2)
        {
            for (int i = 0; i < n; i++)
                cin >> vec[i];
            sort(vec.begin(), vec.end());
            cout << vec[n - 1] << endl;
            for (int i = 0; i < n - 2; i++)
                cout << vec[i] << " ";
            cout << vec[n - 2] << endl;
        }
        else
        {
            int val = 0;
            cin >> val;
            cout << val << endl << -1 << endl;
        }
         
    }
}
/**************************************************************
    Problem: 1185
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:50 ms
    Memory:1520 kb
****************************************************************/

题目1187:最小年龄的3个职工

题目描述:

职工有职工号,姓名,年龄.输入n个职工的信息,找出3个年龄最小的职工打印出来。

输入:

输入第一行包括1个整数N,1<=N<=30,代表输入数据的个数。
接下来的N行有N个职工的信息:
包括职工号(整数), 姓名(字符串,长度不超过10), 年龄(1<=age<=100)。

输出:

可能有多组测试数据,对于每组数据,
输出结果行数为N和3的较小值,分别为年龄最小的职工的信息。

关键字顺序:年龄>工号>姓名,从小到大。

样例输入:
5
501 Jack 6
102 Nathon 100
599 Lily 79
923 Lucy 15
814 Mickle 65
样例输出:
501 Jack 6
923 Lucy 15
814 Mickle 65
  1. #include "string"
  2. #include "algorithm"
  3. #include <iostream>
  4. using namespace std;
  5. typedef struct _Worker
  6. {
  7. int num;
  8. string name;
  9. int age;
  10. }Worker;
  11. bool cmpWorker(Worker x, Worker y)
  12. {
  13. if (x.age != y.age)
  14. {
  15. return x.age < y.age;
  16. }
  17. else
  18. {
  19. if (x.num != y.num)
  20. return x.num<y.num;
  21. else
  22. return x.age<y.age;
  23. }
  24. }
  25. int main(void)
  26. {
  27. int n = 0;
  28. while (cin>>n)
  29. {
  30. Worker w[600];
  31. //Worker *w=new Worker[n];
  32. for (size_t i = 0; i < n; i++)
  33. cin >> w[i].num >> w[i].name >> w[i].age;
  34. //多关键字排序
  35. sort(w, w + n, cmpWorker);//功能是先排年龄,若相等则在其基础上对工号和姓名进行排序。
  36. //输出信息
  37. int min = (n>3) ? 3 : n;
  38. for (int i = 0; i < min; i++)
  39. cout << w[i].num << " " << w[i].name << " " << w[i].age << endl;
  40. }
  41. return 0;
  42. }
  43. /**************************************************************
  44. Problem: 1187
  45. User: EbowTang
  46. Language: C++
  47. Result: Accepted
  48. Time:20 ms
  49. Memory:1528 kb
  50. ****************************************************************/
#include "string"
#include "algorithm"
#include <iostream>
 
using namespace std;
 
typedef struct _Worker
{
    int num;
    string name;
    int age;
}Worker;
 
bool cmpWorker(Worker x, Worker y)
{
    if (x.age != y.age)
    {
        return x.age < y.age;
    }
    else
    {
        if (x.num != y.num)
            return x.num<y.num;
        else
            return x.age<y.age;
    }
}
 
int main(void)
{
    int n = 0;
    while (cin>>n)
    {
        Worker w[600];
        //Worker *w=new Worker[n];
        for (size_t i = 0; i < n; i++)
            cin >> w[i].num >> w[i].name >> w[i].age;
        //多关键字排序
        sort(w, w + n, cmpWorker);//功能是先排年龄,若相等则在其基础上对工号和姓名进行排序。
        //输出信息
        int min = (n>3) ? 3 : n;
        for (int i = 0; i < min; i++)
            cout << w[i].num << " " << w[i].name << " " << w[i].age << endl;
    }
         
    return 0;
}
/**************************************************************
    Problem: 1187
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:20 ms
    Memory:1528 kb
****************************************************************/

题目1189:还是约瑟夫环

题目描述:

生成一个长度为21的数组,依次存入1到21;
建立一个长度为21的单向链表,将上述数组中的数字依次存入链表每个结点中;
将上述链表变为单向封闭(循环)链表;从头结点开始数,将第17个结点删除,将它的下一个结点作为新的头结点;
重复上述过程,直到该链表中只剩一个结点,显示该结点中存入的数字。

输入:

没有任何输入数据。

输出:

输出上面题目描述中最后剩下的节点中存入的数字。

样例输入:
 
  
样例输出:
 
  
提示:

请不要直接输出数据水过去,这样达不到提升自己的目的,
请按照题目要求来做题,这样到真正考试时才能应对自如。


  1. #include "iostream"
  2. using namespace std;
  3. //节点定义
  4. class LinkNode
  5. {
  6. public:
  7. LinkNode(int item)//有参数的构造
  8. {//函数参数表中的形参允许有默认值,但是带默认值的参数需要放后面
  9. next = NULL;
  10. data = item;
  11. }
  12. friend class LinkList;//允许链表类随意访问节点数据
  13. private:
  14. int data;
  15. LinkNode *next;
  16. };
  17. // 带头结点的单链表定义
  18. class LinkList
  19. {
  20. public:
  21. //有参数的构造函数
  22. LinkList(int size)
  23. {
  24. head = new LinkNode(0);//头结点,并未该节点赋值0
  25. nLength = 0;
  26. }
  27. ~LinkList(){}
  28. //定位指定的位置,返回该位置上的结点指针
  29. LinkNode* Locate(int pos);
  30. //在指定位置pos插入值为item的结点,失败返回false
  31. bool Insert(int item, int pos);
  32. //创建一个链表环
  33. void CreatCircle();
  34. //数数出局
  35. bool CountMove(int nStep = 0, int nPersons = 0);
  36. private:
  37. LinkNode *head;//头结点指针
  38. int nLength;//统计节点长度,不算头结点
  39. };
  40. //返回链表中第pos个元素的地址,第0个元素是头结点
  41. LinkNode* LinkList::Locate(int pos)
  42. {
  43. LinkNode *p = head;
  44. int i = 0;
  45. while (p != NULL && i < pos)//p==NULL说明是末尾了
  46. {
  47. p = p->next;
  48. i++;
  49. }
  50. return p;
  51. }
  52. //在pos位置的节点后面插入新节点并赋值item
  53. bool LinkList::Insert(int item, int pos)
  54. {
  55. LinkNode *p = Locate(pos);
  56. LinkNode *newNode = new LinkNode(item);//创建新节点,该节点值为item
  57. //建立连接
  58. newNode->next = p->next;
  59. p->next = newNode;
  60. nLength++;
  61. return true;
  62. }
  63. //创建一个链表环 ,将最后一个节点连接第1个节点从而形成环,注意head是第0个节点
  64. void LinkList::CreatCircle()
  65. {
  66. int nEnd = this->nLength;
  67. int nStart = 1;
  68. LinkNode *pTail = Locate(nEnd);
  69. LinkNode *pcirStart = Locate(nStart);
  70. pTail->next = pcirStart;
  71. }
  72. //从npersons个人中,每数到nstep就出局
  73. bool LinkList::CountMove(int nStep, int nPersons)//指定出局人数
  74. {
  75. LinkNode *pCurr = NULL, *pPrev = NULL;
  76. int i = 0,n = 0;//n统计已经出局的人数
  77. pCurr = pPrev = head;
  78. while (n < nPersons)
  79. {
  80. pPrev = pCurr;//这三行代码模拟数数
  81. pCurr = pCurr->next;
  82. i++;
  83. if (i == nStep)// 此时踢出环 ,删除当前节点并且输出该节点的值
  84. {
  85. pPrev->next = pCurr->next;//重新建立连接
  86. delete pCurr;
  87. pCurr = pPrev->next;//指向新位置的下一个节点
  88. i = 1;
  89. n++;
  90. }
  91. if (pPrev == pCurr)//此时最后一个节点
  92. {
  93. cout << pCurr->data << endl;
  94. delete pCurr;
  95. pCurr = NULL;//最后一个节点删除后的“擦屁股”处理
  96. head->next = head;
  97. n++;
  98. break;
  99. }
  100. }
  101. return true;
  102. }
  103. int main()
  104. {
  105. int nPersons = 21,count = 17;
  106. LinkList ysf(nPersons);
  107. for (int i = 0; i < nPersons; i++)
  108. ysf.Insert(i + 1, i);//在第i个位置插入值为i+1的节点
  109. ysf.CreatCircle();
  110. ysf.CountMove(count, nPersons);//数到count出局
  111. return 0;
  112. }
  113. /**************************************************************
  114. Problem: 1189
  115. User: EbowTang
  116. Language: C++
  117. Result: Accepted
  118. Time:0 ms
  119. Memory:1516 kb
  120. ****************************************************************/
#include "iostream"
using namespace std;
 
//节点定义
class LinkNode
{
public:
    LinkNode(int item)//有参数的构造
    {//函数参数表中的形参允许有默认值,但是带默认值的参数需要放后面  
        next = NULL;
        data = item;
    }
    friend class LinkList;//允许链表类随意访问节点数据
 
private:
    int data;
    LinkNode *next;
};
 
// 带头结点的单链表定义 
class LinkList
{
public:
    //有参数的构造函数  
    LinkList(int size)
    {
        head = new LinkNode(0);//头结点,并未该节点赋值0  
        nLength = 0;
    }
    ~LinkList(){}
    //定位指定的位置,返回该位置上的结点指针  
    LinkNode* Locate(int pos);
    //在指定位置pos插入值为item的结点,失败返回false  
    bool Insert(int item, int pos);
    //创建一个链表环  
    void CreatCircle();
    //数数出局  
    bool CountMove(int nStep = 0, int nPersons = 0);
 
private:
    LinkNode *head;//头结点指针
    int nLength;//统计节点长度,不算头结点
};
 
//返回链表中第pos个元素的地址,第0个元素是头结点
LinkNode* LinkList::Locate(int pos)
{
    LinkNode *p = head;
    int i = 0;
    while (p != NULL && i < pos)//p==NULL说明是末尾了
    {
        p = p->next;
        i++;
    }
 
    return p;
}
 
//在pos位置的节点后面插入新节点并赋值item
bool LinkList::Insert(int item, int pos)
{
    LinkNode *p = Locate(pos);
    LinkNode *newNode = new LinkNode(item);//创建新节点,该节点值为item  
    //建立连接
    newNode->next = p->next;
    p->next = newNode;
    nLength++;
    return true;
}
 
//创建一个链表环 ,将最后一个节点连接第1个节点从而形成环,注意head是第0个节点
void LinkList::CreatCircle()
{
    int nEnd = this->nLength;
    int nStart = 1;
    LinkNode *pTail = Locate(nEnd);
    LinkNode *pcirStart = Locate(nStart);
    pTail->next = pcirStart;
}
 
//从npersons个人中,每数到nstep就出局
bool LinkList::CountMove(int nStep, int nPersons)//指定出局人数  
{
    LinkNode *pCurr = NULL, *pPrev = NULL;
    int i = 0,n = 0;//n统计已经出局的人数
    pCurr = pPrev = head;
    while (n < nPersons)
    {
        pPrev = pCurr;//这三行代码模拟数数
        pCurr = pCurr->next;
        i++;
         
        if (i == nStep)// 此时踢出环 ,删除当前节点并且输出该节点的值
        {   
            pPrev->next = pCurr->next;//重新建立连接
            delete pCurr;
            pCurr = pPrev->next;//指向新位置的下一个节点
            i = 1;
            n++;
        }
 
        if (pPrev == pCurr)//此时最后一个节点
        { 
            cout  << pCurr->data << endl;    
            delete pCurr;
            pCurr = NULL;//最后一个节点删除后的“擦屁股”处理  
            head->next = head;
            n++;
            break;
        }
         
    }
    return true;
}
 
int main()
{
    int nPersons = 21,count = 17;
    LinkList ysf(nPersons);
    for (int i = 0; i < nPersons; i++)
        ysf.Insert(i + 1, i);//在第i个位置插入值为i+1的节点
    ysf.CreatCircle();
    ysf.CountMove(count, nPersons);//数到count出局
     
    return 0;
}
/**************************************************************
    Problem: 1189
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:0 ms
    Memory:1516 kb
****************************************************************/

题目1192:回文字符串

题目描述:

给出一个长度不超过1000的字符串,判断它是不是回文(顺读,逆读均相同)的。

输入:

输入包括一行字符串,其长度不超过1000。

输出:

可能有多组测试数据,对于每组数据,如果是回文字符串则输出"Yes!”,否则输出"No!"。

样例输入:
hellolleh
helloworld
样例输出:
Yes!
No!
  1. #include "string"
  2. #include <iostream>
  3. #include "algorithm"
  4. using namespace std;
  5. int main()
  6. {
  7. string str;
  8. while (getline(cin, str))
  9. {
  10. bool flag = false;
  11. for (int i = 0; i < str.length(); i++)
  12. {//回文的重要判断依据就是前后对应位置字符必须一样
  13. if (str[i] != str[str.length() - 1 - i])
  14. {
  15. flag = true;
  16. break;
  17. }
  18. }
  19. if (flag)
  20. cout << "No!" << endl;
  21. else
  22. cout << "Yes!" << endl;
  23. }
  24. return 0;
  25. }
  26. /**************************************************************
  27. Problem: 1192
  28. User: EbowTang
  29. Language: C++
  30. Result: Accepted
  31. Time:40 ms
  32. Memory:1520 kb
  33. ****************************************************************/
#include "string"
#include <iostream>
#include "algorithm"
 
using namespace std;
 
int main()
{
    string str;
    while (getline(cin, str))
    {
        bool flag = false;
        for (int i = 0; i < str.length(); i++)
        {//回文的重要判断依据就是前后对应位置字符必须一样
            if (str[i] != str[str.length() - 1 - i])
            {
                flag = true;
                break;
            }
        }
        if (flag)
            cout << "No!" << endl;
        else
            cout << "Yes!" << endl;
    }
    return 0;
}
/**************************************************************
    Problem: 1192
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:40 ms
    Memory:1520 kb
****************************************************************/

题目1193:矩阵转置

题目描述:

输入一个N*N的矩阵,将其转置后输出。要求:不得使用任何数组(就地逆置)。

输入:

输入的第一行包括一个整数N,(1<=N<=100),代表矩阵的维数。
接下来的N行每行有N个整数,分别代表矩阵的元素。

输出:

可能有多组测试数据,对于每组数据,将输入的矩阵转置后输出。

样例输入:
3
1 2 3
4 5 6
7 8 9
样例输出:
1 4 7
2 5 8
3 6 9
  1. #include <cstdio>
  2. #include <cstdlib>
  3. #include "vector"
  4. #include "string"
  5. #include "algorithm"
  6. #include <iostream>
  7. #include "stack"
  8. #include "math.h"
  9. #define MAXN 100
  10. using namespace std;
  11. int main()
  12. {
  13. int n, i, j;
  14. int array[MAXN][MAXN];
  15. while (scanf("%d", &n) != EOF)
  16. {
  17. for (i = 0; i < n; i++)
  18. {//获取数据
  19. for (j = 0; j < n; j++)
  20. scanf("%d", &array[i][j]);
  21. }
  22. for (i = 0; i < n; i++)
  23. {//交换array[i][j]和array[j][i]
  24. for (j = i; j < n; j++)
  25. {
  26. int temp;
  27. temp = array[i][j];
  28. array[i][j] = array[j][i];
  29. array[j][i] = temp;
  30. }
  31. }
  32. for (i = 0; i < n; i++)
  33. {
  34. printf("%d", array[i][0]);
  35. for (j = 1; j < n; j++)
  36. printf(" %d", array[i][j]);
  37. printf("\n");
  38. }
  39. }
  40. return 0;
  41. }
  42. /**************************************************************
  43. Problem: 1193
  44. User: EbowTang
  45. Language: C++
  46. Result: Accepted
  47. Time:10 ms
  48. Memory:1520 kb
  49. ****************************************************************/
#include <cstdio>  
#include <cstdlib>  
#include "vector"
#include "string"
#include "algorithm"
#include <iostream>
#include "stack"
#include "math.h"  
 
#define MAXN 100  
using namespace std;
 
 
int main()
{
    int n, i, j;
    int array[MAXN][MAXN];
    while (scanf("%d", &n) != EOF) 
    {
        for (i = 0; i < n; i++) 
        {//获取数据
            for (j = 0; j < n; j++)
                scanf("%d", &array[i][j]);
        }
        for (i = 0; i < n; i++) 
        {//交换array[i][j]和array[j][i]
            for (j = i; j < n; j++) 
            {
                int temp;
                temp = array[i][j];
                array[i][j] = array[j][i];
                array[j][i] = temp;
            }
        }
        for (i = 0; i < n; i++) 
        {
            printf("%d", array[i][0]);
            for (j = 1; j < n; j++)
                printf(" %d", array[i][j]);
            printf("\n");
        }
    }
    return 0;
}
/**************************************************************
    Problem: 1193
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:10 ms
    Memory:1520 kb
****************************************************************/

题目1194:八进制

题目描述:

输入一个整数,将其转换成八进制数输出。

输入:

输入包括一个整数N(0<=N<=100000)。

输出:

可能有多组测试数据,对于每组数据,
输出N的八进制表示数。

样例输入:
7
8
9
样例输出:
7
10
11
  1. #include "vector"
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6. int n = 0;
  7. while (cin >> n )
  8. {
  9. if (n == 0)
  10. {
  11. cout << 0 << endl;
  12. continue;
  13. }
  14. vector<int> vec(100,0);
  15. int nsize = 0;
  16. while (n > 0)
  17. {//获取8进制数,放入数组
  18. vec[nsize++] = n % 8;
  19. n = n / 8;
  20. }
  21. for (int i = nsize-1; i >= 0; i--)
  22. cout << vec[i];
  23. cout << endl;
  24. }
  25. return 0;
  26. }
  27. /**************************************************************
  28. Problem: 1194
  29. User: EbowTang
  30. Language: C++
  31. Result: Accepted
  32. Time:200 ms
  33. Memory:1520 kb
  34. ****************************************************************/
#include "vector"
#include <iostream>
using namespace std;
 
int main()
{
    int n = 0;
    while (cin >> n )
    {
        if (n == 0)
        {
            cout << 0 << endl;
            continue;
        }
        vector<int> vec(100,0);
        int nsize = 0;
        while (n > 0)
        {//获取8进制数,放入数组
            vec[nsize++] = n % 8;
            n = n / 8;
        }
        for (int i = nsize-1; i >= 0; i--)
            cout << vec[i];
        cout << endl;
    }
    return 0;
}
/**************************************************************
    Problem: 1194
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:200 ms
    Memory:1520 kb
****************************************************************/

题目1196:成绩排序

题目描述:

用一维数组存储学号和成绩,然后,按成绩排序输出。

输入:

输入第一行包括一个整数N(1<=N<=100),代表学生的个数。
接下来的N行每行包括两个整数p和q,分别代表每个学生的学号和成绩。

输出:

按照学生的成绩从小到大进行排序,并将排序后的学生信息打印出来。
如果学生的成绩相同,则按照学号的大小进行从小到大排序。

样例输入:
3
1 90
2 87
3 92
样例输出:
2 87
1 90
3 92

  1. #include "vector"
  2. #include<algorithm>
  3. #include <iostream>
  4. using namespace std;
  5. typedef struct _StuInfo
  6. {
  7. int num;//学号
  8. int score;//分数
  9. }StuInfo;
  10. bool cmpStu(StuInfo x, StuInfo y)
  11. {
  12. if (x.score != y.score)
  13. return x.score < y.score;
  14. else
  15. {
  16. if (x.num != y.num)//如果分数相同则按照学号排名
  17. return x.num<y.num;
  18. }
  19. }
  20. int main()
  21. {
  22. StuInfo a[100];
  23. int n;
  24. while (cin >> n)//人数
  25. {
  26. //获取数据
  27. for (int i = 0; i<n; i++)
  28. cin >> a[i].num >> a[i].score;
  29. //多关键字排序
  30. sort(a, a + n, cmpStu);//功能是先排分数,若相等则在其基础上对名字和年龄进行排序。
  31. //输出信息
  32. for (int i = 0; i<n; i++)
  33. cout << a[i].num << " " << a[i].score << endl;
  34. }
  35. return 0;
  36. }
  37. /**************************************************************
  38. Problem: 1196
  39. User: EbowTang
  40. Language: C++
  41. Result: Accepted
  42. Time:470 ms
  43. Memory:1520 kb
  44. ****************************************************************/
#include "vector"
#include<algorithm>
#include <iostream>
 
using namespace std;
 
typedef struct _StuInfo
{
    int num;//学号
    int score;//分数
}StuInfo;
 
bool cmpStu(StuInfo x, StuInfo y)
{
    if (x.score != y.score)
        return x.score < y.score;
    else
    {
        if (x.num != y.num)//如果分数相同则按照学号排名
            return x.num<y.num;
    }
}
 
int main()
{
    StuInfo a[100];
    int n;
    while (cin >> n)//人数
    {
        //获取数据
        for (int i = 0; i<n; i++)
            cin >> a[i].num >> a[i].score;
        //多关键字排序
        sort(a, a + n, cmpStu);//功能是先排分数,若相等则在其基础上对名字和年龄进行排序。
        //输出信息
        for (int i = 0; i<n; i++)
            cout << a[i].num << " " << a[i].score << endl;
    }
    return 0;
}
/**************************************************************
    Problem: 1196
    User: EbowTang
    Language: C++
    Result: Accepted
    Time:470 ms
    Memory:1520 kb
****************************************************************/

题目1198:a+b

题目描述:

实现一个加法器,使其能够输出a+b的值。

输入:

输入包括两个数a和b,其中a和b的位数不超过1000位。

输出:

可能有多组测试数据,对于每组数据,
输出a+b的值。

样例输入:
2 6
10000000000000000000 10000000000000000000000000000000
样例输出:
8
10000000000010000000000000000000
  1. #include "vector"
  2. #include "string"
  3. #include <iostream>
  4. #include "algorithm"
  5. #define N 1010
  6. int len = 1001;
  7. using namespace std;
  8. void AddBigNum(const string &a, const string &b, vector<int> &ansStr);
  9. int main()
  10. {
  11. string bigNum1, bigNum2; // 初始状态用string来存储大数
  12. while (cin >> bigNum1 >> bigNum2)
  13. {
  14. int c = max(bigNum1.size(),bigNum2.size());
  15. vector<int> ans(len, 0);//接收答案
  16. AddBigNum(bigNum1, bigNum2, ans);//执行大整数加法
  17. if (ans[0] != 0) //看看最高位是否有进位
  18. for (int i = 0; i <= c; i++)
  19. cout << ans[i];
  20. else
  21. for (int i = 1; i <= c; i++)
  22. cout << ans[i];
  23. cout << endl;
  24. ans.clear();
  25. }
  26. return 0;
  27. }
  28. void AddBigNum(const string &a, const string &b, vector<int> &ans)
  29. {
  30. int length1=a.size(), length2=b.size();
  31. vector<int> anum(len,0),bnum(len,0);
  32. int k = max(a.size(), b.size());
  33. int c = k;
  34. //按照字符串中的数据顺序转换成整数
  35. for (int i = 0; i<length1; k--, i++) //低位放在数组的前面,比如523,a[3]=3,a[2]=2,a[1]=5
  36. anum[k] = a[length1 - 1 - i] - '0';
  37. for (int i = 0, k = c; i<length2; k--, i++) //低位放在数组的前面,比如19,b[3]=9,b[2]=1,b[1]=0
  38. bnum[k] = b[length2 - 1 - i] - '0';
  39. //作位相加
  40. for (int i = c; i>0; i--)
  41. ans[i] = anum[i] + bnum[i];//ans[3]=12,ans[2]=3,ans[1]=5
  42. //进位,低位向高位进位
  43. for (int i = c; i>0; i--)
  44. {
  45. if (ans[i] >= 10)
  46. {//ans[i-1]是高位,ans[i]是低位
  47. ans[i - 1] += ans[i] / 10;
  48. ans[i] = ans[i] % 10;
  49. }
  50. }
  51. }
  52. /**************************************************************
  53. Problem: 1198
  54. User: EbowTang
  55. Language: C++
  56. Result: Accepted
  57. Time:150 ms
  58. Memory:1520 kb
  59. ****************************************************************/  
分区补光与ISP图像调节技术 在安防监控场景中,逆光、强光、明暗不均(如门口 / 窗边的 “阴阳脸” 画面)是导致图像细节丢失的核心问题。分区补光技术通过对画面不同亮度区域精准补光,解决 “局部过曝 / 欠曝” 难题;ISP(图像信号处理器)图像调节技术则通过算法优化,提升画面色彩、对比度与细节。二者协同可实现 “硬件补光 + 算法优化” 的双重增强,是低功耗摄像机实现高清画质的关键技术组合。分区补光与 ISP 图像调节技术:原理、协同方案及安防监控应用案例。一、核心技术原理解析。 阅读详情

相关推荐

第二十三章 Nest集成日志框架Winston

Winston是一个非常流行的Node.js日志框架,而Nest.js是一个基于Node.js的后端框架。修改 winston.module.ts 内容如下 添加 forRoot 方法,接收 winston 的 createLogger 方法的参数,返回动态模块的 providers、exports。这里用到了 printf 的 format 函数,它可以自定义打印的日志格式 且使用了chalk 加上了颜色,并且打印了 dayjs 格式化的时间。可以看到控制台打印了自定义的 logger 的自定义。

枫ゞ的博客 1069

每日一题(五):栈的基础应用

1. 题目描述:     在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$"标注,不能匹配的右括号用"?"标注. 输入:     输入包括多组数据,每组数据一行,包含一个字符串,只包含...

老肥码码码 3550

本地部署开源视频会议解决方案 Jitsi Meet 并实现外网访问

Jitsi Meet 是一款基于 WebRTC 技术的开源视频会议解决方案,它允许用户通过互联网进行高质量的视频通话、语音通话和文本聊天,非常适合用于在线教育、远程办公、团队协作等场景。本文将详细介绍如何利用 Docker 在本地部署 Jitsi Meet 并结合路由侠实现外网访问本地部署的 Jitsi Meet。

lyxnwct的博客 1946

栈的应用--括号匹配

问题描述: 题目描述: 在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$“标注,不能匹配的右括号用”?"标注. 输入: 输入包括多组数据,每组数据一行,包含一个字符串,只包含左右括号和大小写字母,字符串长度不超过100。 注意:cin.getline(str,100)最多只能输入99个字符! 输出:

qq_43637727的博客 701

ESP32S3 Korvo2V3四通道AEC配置实战:基于AFE的回声消除优化

本文详细介绍了在ESP32S3 Korvo2V3平台上配置四通道AEC(回声消除)的实战经验。通过AFE算法优化和硬件连接调试,实现高质量回声消除,显著提升智能音箱和会议设备的语音交互体验。重点解析了四通道配置、数据格式对齐和参数调优等关键技术要点。

elastic6hunter的博客 938

【深度解析】AURIX TC387 UCB Flash架构与避坑指南(第一篇)

摘要:UCB(用户配置块)是AURIX TC3xx芯片启动与安全的关键配置区域,位于DFLASH0存储区。每个512字节的UCB包含启动模式、安全设置等关键参数,并通过强制CRC32校验确保完整性。UCB分为启动头(UCB_BMHD)、安全配置(UCB_ORIG)及其备份(UCB_COPY)三种主要类型。不同于常规Flash,UCB具有自动擦除特性,错误配置可能导致芯片永久锁死。开发中应谨慎修改UCB,必须同时编程原始和备份版本,并确保正确的CRC校验。后续文章将详细介绍UCB编程方法和调试技巧。

2511_94612429的博客 1236

位操作练习

描述给出两个不大于65535的非负整数,判断其中一个的16位二进制表示形式,是否能由另一个的16位二进制表示形式经过循环左移若干位而得到。循环左移和普通左移的区别在于:最左边的那一位经过循环左移一位后就会被移到最右边去。比如:1011 0000 0000 0001 经过循环左移一位后,变成 0110 0000 0000 0011, 若是循环左移2位,则变成 1100 0000 0000 0110输...

sunshine_lyn的博客 752

新能源知识库(62)组串式、集中式和高压直挂式

因需多台PCS及独立监控设备,单位功率成本比集中式高15%–20%。高压直挂式因省去变压器,大容量项目成本更低(>5MW时优势显著)。组串式储能、集中式储能和高压直挂式储能是当前主流的三类技术路线,其核心差异源于系统架构和控制逻辑的设计差异。组串式交流侧需变压器升压至10kV/35kV,高压直挂式可直接输出6kV/35kV电压,减少转换损耗。多台小功率PCS并联(每簇独立管理)单台大功率PCS(多簇直流侧并联)环流导致容量衰减(损失5%–8%)无变压器损耗(效率>99%)高压直挂电站(≥10MW)

竹君子之家 1517

OJ刷题笔记 18933 括号匹配问题

18933 括号匹配问题 Description 来源于POJ3704。 在某个字符串(长度不超过100)中有左括号、右括号和大小写字母; 规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。 写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。 不能匹配的左括号用"$“标注,不能匹配的右括号用”?"标注. 输入格式 输入包括多组数据,每组数据一行,包含一个字符串,只包含左右括号和大小写字母,字符串长度不超过100。 输出格式 对每组输出

Kwan_的博客 1525

华为、Cisco、H3C、中兴网络设备如何配置syslog日志采集

华为、Cisco、H3C、中兴网络设备如何配置syslog日志采集

weixin_40239644的博客 8707

汇川AM系列PLC玩转CNC:手把手教你用File模式读取G代码文件(附避坑指南)

本文详细介绍了如何使用汇川AM系列PLC的File模式读取G代码文件,涵盖从CAD设计到PLC配置的全流程。特别针对路径格式、文件类型等常见问题提供避坑指南,帮助工程师快速实现CNC加工的自动化控制。

weixin_33582311的博客 408

jobdu 26 括号匹配问题

题目描述:     在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$"标注,不能匹配的右括号用"?"标注. 输入:     输入包括多组数据,每组数据一行,包含一个字符串,只包含左右

Steve Sun的专栏 2482

PON架构(全光网络)

目前组网架构世界上有一种最快的速度又是光,以前传统以太网络规划满足不了现在的需求。有线网 无线网 全光网络方案场景 全光网络分类 以太全光网络 PON(Pas-sive-Optical Network 无源光网络) 再典型的中大型高校网络中 推荐万兆入室 千兆到桌面的带宽设计 一般三层 (终端-接入层-汇聚层-核心层-出口(安全设备)-互联网) 单校区核心设备 一般采用两台高性能的核心交换机 双机的方式采用的是 M-LAG 多校区之间核心交换机采用1

qq_56248592的博客 6269

【栈的应用】九度OJ 1153:括号匹配问题

一、题目内容 题目描述: 在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$"标注,不能匹配的右括号用"?"标注. 输入: 输入包括多组数据,每组数据一行,包含一个字符串,只包含左右括号和大小写字母,字符串长度不超过100。 注意:cin.getline(str,100)最多只能

szy_fasheng的博客 574

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

位操作练习_STL

题目描述给出两个不大于65535的非负整数,判断其中一个的16位二进制表示形式,是否能由另一个的16位二进制表示形式经过循环左移若干位而得到。 循环左移和普通左移的区别在于:最左边的那一位经过循环左移一位后就会被移到最右边去。比如: 1011 0000 0000 0001 经过循环左移一位后,变成 0110 0000 0000 0011, 若是循环左移2位,则变成 1100 0000 0000 0...

qq_38030194的博客 489

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

全国青少年C语言等级考试--20.9扩号匹配问题

全国青少年C语言等级考试--20.9扩号匹配问题 第三题

fight_andy的博客 326

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

OJ 1315 括号匹配问题

描述 在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$"标注,不能匹配的右括号用"?"标注。 输入 输入包括多组数据,每组数据一行,包含一个字符串,只包含左右括号和大小写字母,字符串长度不超过100。 注意:cin.getline(str,100)最多只能输入99个字符! 输出 对每组输

JetEcho的博客 1028

机试指南练习-第三章

机试指南练习总结第三章机试指南练习总结第三章-栈的应用例题3.1:括号匹配问题 机试指南练习总结第三章-栈的应用 例题3.1:括号匹配问题 题目描述 在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$“标注,不能匹配的右括号用”?"标注. 输入描述 输入包括多组数据,每组数据一行,包含一个字符串,只包

qq_41911859的博客 1082

【括号匹配问题】与【放苹果问题】——递归的算法应用

括号匹配问题 问题描述 在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用“$”标注,不能匹配的右括号用“?”标注。 输入 输入包括多组数据,每组数据一行,包含一个字符串,只包含左右括...

Champagne Jin 1576

南沙C++信奥老师解一本通题:1203:扩号匹配问题

规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$"标注,不能匹配的右括号用"?对每组输出数据,输出两行,第一行包含原始输入字符,第二行由"$","?"和空格组成,"$"和"?"表示与之对应的左括号和右括号不能匹配。输入包括多组数据,每组数据一行,包含一个字符串,只包含左右括号和大小写字母,字符串长度不超过100。

vx_cyf1333888的博客 426

【栈】扩号匹配问题(水题)

在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$"标注,不能匹配的右括号用"?"标注。

GoWilli的优快云 424

关于C语言的括号匹配问题

在某个字符串(长度不超过 100)中有左括号、右括号和大小写字母;规定(与 常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号 不能匹配的左括号用"$“标注,不能匹配的右括号 用”?"标注。

qq_48456477的博客 402

九度OnlineJudge-括号匹配问题(1153)

题目链接:    http://ac.jobdu.com/problem.php?pid=1153 题目描述:     在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$"标注,不

dupengchuan的专栏 1045

信息学奥赛一本通C++语言——1151:素数个数

【题目描述】 编程求2~n(n为大于2的正整数)中有多少个素数。 【输入】 输入n(2≤n≤50000)。 【输出】 素数个数。 【输入样例】 10 【输出样例】 4 #include<iostream> #include<cmath> using namespace std; bool prime(int num); int main() { int n; int c...

子航OIer 3558

九度OJ_1153:括号匹配问题

题目描述:     在某个字符串(长度不超过100)中有左括号、右括号和大小写字母;规定(与常见的算数式子一样)任何一个左括号都从内到外与在它右边且距离最近的右括号匹配。写一个程序,找到无法匹配的左括号和右括号,输出原来字符串,并在下一行标出不能匹配的括号。不能匹配的左括号用"$"标注,不能匹配的右括号用"?"标注. 输入:     输入包括多组数据,每组数据一行,包含一个字

VivBin的博客 772

【慢慢学算法】:位运算练习

题目描述: 给出两个不大于65535的非负整数,判断其中一个的16位二进制表示形式,是否能由另一个的16位二进制表示形式经过循环左移若干位而得到。循环左移和普通左移的区别在于:最左边的那一位经过循环左移一位后就会被移到最右边去。比如:1011 0000 0000 0001 经过循环左移一位后,变成 0110 0000 0000 0011, 若是循环左移2位,则变成 1100 0000 0000 ...

weixin_30482383的博客 262
上一篇: 题目1200:最大的两个数
下一篇: ACM刷题有用博客地址
It_BeeCoder
博客等级 码龄10年 967粉丝 238原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值