177 条题解

  • -2
    @ 2022-12-18 14:34:06

    我隔着电脑屏幕都能感受到不会做的人深深的建议。 当然,以上是在开玩笑。

    • -2
      @ 2022-12-18 14:27:24

      我不会呀!

      • -2
        @ 2022-12-18 14:26:14
        #include <iostream>
        using namespace std;
        int main()
        {
            cout << 7;
            return 0;
        }
        
        • -2
          @ 2022-12-18 14:17:37
          a = int(input())
          b = int(input())
          print (a + b)
          

          请问以上python有错吗?

        • -2
          @ 2022-12-14 20:34:19

          竟然没人用高精度

          #include <iostream>
          using namespace std;
          string a , b;
          int ans[250] , numa[240] , numb[240] , lena , lenb , lenans , top;
          int main()
          {
              cin >> a >> b;
              lena = a.length();
              lenb = b.length();
              lenans = max(lena , lenb);//获取长度
              //翻转
              for (int i = 0 ; i < lena ; i++)
              {
                  numa[i] = a[lena - i - 1] - '0';
              }
              for (int i = 0 ; i < lenb ; i++)
              {
                  numb[i] = b[lenb - i - 1] - '0';
              }
              //竖式计算!
              for (int i = 0 ; i < lenans ; i++)
              {
                  ans[i] += numa[i] + numb[i];
              }
              for (int i = 0 ; i < lenans ; i++)
              {
                  ans[i + 1] += ans[i] / 10;
                  ans[i] %= 10;
              }
              //输出
              if (ans[lenans] > 0) top = lenans;
              else top = lenans - 1;
              for (int i = top ; i >= 0 ; i--)
              {
                  cout << ans[i];
              }
              return 0;  
          }
          
        • -2
          @ 2022-12-3 20:17:22
          print(7)
          

          ...

          • @ 2022-12-8 21:49:13

            6

          • @ 2022-12-18 14:22:03

            终于有个会python的了,感觉我找到了同类。

          • @ 2023-2-9 14:44:30

            我tm不仅会python!!!还会Java!Pascal!Ruby!PHP!· · · · · ·

          • @ 2023-4-15 19:55:07

            @ 7(因为6死了)

            我也会Python!!!

            print('我也会Python!!!')
            
        • -2
          @ 2022-8-21 21:08:13

          就先定义A和B,然后打印A和B相加的结果。

          • -2
            @ 2022-8-20 15:18:09

            #include <iostream> using namespace std; int main() { int a,b;//定义int类型变量a,b cin >> a >> b;//输入a,b cout<<a+b;//输出a+b的值 return 0;//程序结束 }

            • -2
              @ 2022-8-20 15:13:02

              #include <iostream> using namespace std; int main() { int a,b;//定义int类型变量a,b cin >> a >> b;//输入a,b cout<<a+b;//输出a+b的值 return 0;//程序结束 }

              • -2
                @ 2022-8-18 14:59:20
                #include <iostream>
                using namespace std;
                int main()
                {
                    int a,b;
                    cin >> a >> b;
                    cout << a + b;
                }
                
                • -2
                  @ 2022-8-17 21:41:03
                  #include<iostream>
                  using namespace std;
                  int main()
                  {
                      int a,b;
                      cin>>a>>b;
                      cout<<a+b<<endl;
                      return 0;
                  }
                  
                  • -2
                    @ 2022-8-16 19:54:39
                    #include<bits/stdc++.h>
                    using namespace std;
                    int main()
                    {
                    	int a,b;
                    	cin >> a >> b;
                    	cout << a+b << endl;
                    	return 0;
                    }
                    
                    • -2
                      @ 2022-8-16 19:53:58
                      #include<bits/stdc++.h>
                      using namespace std;
                      int main()
                      {
                      	int a,b;
                      	cin >> a >> b;
                      	cout << a+b << endl;
                      	return 0;
                      }
                      
                      • -2
                        @ 2022-8-16 8:55:10

                        第一题 #include <iostream> using namespace std; int main() { int n, x; cin >> n >> x; cout << n + x ; return 0; }

                        • -2
                          @ 2022-8-6 16:25:24

                          这题还要注释么.......

                          #include <bits/stdc++.h>
                          using namespace std;
                          int main()
                          {
                              int a, b;
                              cin >> a >> b;
                              cout << a + b << endl;
                              return 0;
                          }
                          
                          • -2
                            @ 2022-8-4 15:01:10

                            #include <bits/stdc++.h>//万能头文件 using namespace std; int main() { int a,b;//定义两个整数的变量 cin >>a >> b;//输入 cout << a+b;//输出和 return 0; }

                            • -2
                              @ 2022-8-4 8:07:02

                              首先要下万能头文件: #include<iostream>。。。。。。 初始设置变量 int n,。。。。。。 输入两个值 cin>>。。。。。。 输出它们的和 cout<<。。+。。。。 最后结束

                              return 0; } 别忘了;

                              • -2
                                @ 2022-7-21 13:09:27

                                很简单,cin+cout:

                                #include <bits/stdc++.h>
                                using namespace std;
                                
                                int main()
                                {
                                //  freopen(" .in", "r", stdin);
                                //  freopen(" .out", "w", stdout);
                                int a, b;
                                cin >> a >> b;
                                cout << a+b;
                                return 0;
                                }
                                

                                熟悉一下Online Judge的环境

                                • -3
                                  @ 2023-8-30 10:02:42
                                  #include<bits/stdc++.h>
                                  using namespace std;
                                  #define set(x) Set(x)
                                  #define REP(i,j,k) for (int i=(j),_end_=(k);i<=_end_;++i)
                                  #define DREP(i,j,k) for (int i=(j),_start_=(k);i>=_start_;--i)
                                  #define mp make_pair
                                  #define x first
                                  #define y second
                                  #define pb push_back
                                  template<typename T> inline bool chkmin(T &a,const T &b){ return a > b ? a = b, 1 : 0; }
                                  template<typename T> inline bool chkmax(T &a,const T &b){ return a < b ? a = b, 1 : 0; }
                                  typedef long long LL;
                                  typedef pair<int,int> node;
                                  const int dmax = 1010, oo = 0x3f3f3f3f;
                                  int n, m;
                                  int a[dmax][dmax] , ans;
                                  int d[dmax], e[dmax];
                                  priority_queue <node> q;
                                  inline bool operator >(node a,node b){ return a.y>b.y; }
                                  bool p[dmax];
                                  void Set(int x){ p[x] = 1; }
                                  void unset(int x){ p[x] = 0; }
                                  bool check(int x){ return x != 1 && x != n && !p[x] && e[x] > 0; }
                                  void preflow(){
                                      e[1] = oo;
                                      d[1] = n - 1;
                                      q.push(mp(1, n - 1));
                                      set(1);
                                      while (!q.empty()) {
                                          bool flag = 1;
                                          int k = q.top().x;
                                          q.pop(), unset(k);
                                          DREP(i, n, 1)
                                          if ((d[k] == d[i] + 1 || k == 1) && a[k][i] > 0){
                                              flag = 0;
                                              int t = min(a[k][i], e[k]);
                                              e[k] -= t;
                                              a[k][i] -= t;
                                              e[i] += t;
                                              a[i][k] += t;
                                              if (check(i)) {
                                                  q.push(mp(i, d[i]));
                                                  set(i);
                                              }
                                              if (e[k] == 0) break;
                                          }
                                          if (flag) {
                                              d[k] = oo;
                                              REP(i, 1, n)
                                              if (a[k][i] > 0) chkmin(d[k], d[i] + 1);
                                          }
                                          if (check(k)) {
                                              q.push(mp(k, d[k]));
                                              set(k);
                                          }
                                      }
                                      ans = e[n];
                                  }
                                  int main() {
                                      n = 2, m = 2;
                                      int x, y;
                                      scanf("%d%d", &x, &y);
                                      a[1][2] += x + y;
                                      preflow();
                                      printf("%d\n", ans);
                                      return 0;
                                  }
                                  //也是非常简单
                                  
                                  • -3
                                    @ 2023-8-28 14:47:33

                                    wo

                                    【入门】熟悉一下Online Judge的环境

                                    信息

                                    ID
                                    1
                                    时间
                                    1000ms
                                    内存
                                    16MiB
                                    难度
                                    6
                                    标签
                                    递交数
                                    21681
                                    已通过
                                    7188
                                    上传者