Advertisement

PAT : 数据结构与算法中文题库(7-8卷):哈利·波特考试

阅读量:
复制代码
 #include <iostream>

    
 #include <cstring>
    
 #include <vector>
    
 #include <queue>
    
 using namespace std;
    
 const auto INF = 0x3F3F3F3F;
    
  
    
 int getdigit(void)
    
 {
    
     int temp{0};
    
     char ch;
    
     while (1)
    
     {
    
     ch = getchar();
    
     if (ch == ' ' || ch == '\n' || ch == '\n')
    
         return temp;
    
     temp = temp * 10 + ch - '0';
    
     }
    
 }
    
 void putdigit(int temp)
    
 {
    
     if (temp >= 10)
    
     putdigit(temp / 10);
    
     putchar('0' + (temp % 10));
    
 }
    
 int main(int 

全部评论 (0)

还没有任何评论哟~