177 条题解

  • 0
    @ 2023-8-15 21:39:20

    哎呀,别人都太麻烦 了,看看我的,100%AC ,什么数据都能过。

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
    int a,b;
    cin>>a>>b;//输入a,b
    cout<<a+b;//输出a+b
    return 0;
    }
    

    邮箱号ASheepBoy_Bed@163.com有问题联系我......

  • 0
    @ 2023-8-7 20:36:57
    #include <iostream> 
    using namespace std;
    int main()
    {
        int a,b;
        cin >>a >> b;
         cout << a + b << " ";
        return 0;
    }
    
    • 0
      @ 2023-7-12 16:05:38

      灰常简单

      
      

      #include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; cout << a + b; return 0; }

      
      
      • 0
        @ 2023-7-10 17:29:19
        1. #include <iostream> //预处理命令
        2. usingnamespace std; //使用命名空间std
        3. int main() //主函数首部
        4. {
        5. int a,b,sum; //函数体开始
        6. cin>>a>>b;		//输入语句
          
        7. sum=a+b;		//赋值语句
          
        8. cout<<"a+b="<<sum<<endl;	//输出语句
          
        9. return0; //如正常结束返回0,
        10. //不能则返回非零值
        11. }

        *简简单单

        • -1
          @ 2024-5-7 18:52:07
          using namespace std;
          int main()
          {
          cout << 7;
          return 0;
          }
          
          
          • -1
            @ 2024-5-5 22:37:33

            #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; } //#include <bits/stdc++.h> //using namespace std; //struct Plus //{ // int a,b;//定义一个结构体 //}; //stack<int> sta;//定义一个栈 //int main() //{ // Plus c;//结构体变量 // cin >> c.a >> c.b; // sta.push(c.a);//入栈 // sta.push(c.b); // int s; // s += sta.top();//输出栈顶元素 // sta.pop();//出栈 // s += sta.top(); // cout << s;//输出总和 // return 0; //} //#include <bits/stdc++.h> //using namespace std; //int n = 2, a[5], s; //int dfs(int x, int sum) { // if (x > n) return sum; // int i = dfs(x + 1, sum); // int j = dfs(x + 1, sum + a[x]); // if (i == s) return i; // if (j == s) return j; // return -1; //} //int main() { // for (int i = 1;i <= n; i++) scanf("%d", &a[i]), s += a[i]; // cout << dfs(1, 0) << endl; // return 0; //} //#include <bits/stdc++.h> //using namespace std; //int d[5][5], n = 3; //int main() { // int a, b; scanf("%d%d", &a, &b); // memset(d, 0x3f, sizeof d); // d[1][2] = a; d[2][3] = b; // for (int k = 1;k <= n; k++) // for (int i = 1;i <= n; i++) // for (int j = 1;j <= n; j++) // d[i][j] = min(d[i][j], d[i][k] + d[k][j]); // printf("%d\n", d[1][3]); // return 0; //} //#include <iostream> //#include <cstring> //#include <algorithm> //#include <numeric> //#include<iterator> //using namespace std; //int main() //{ // istream_iterator<int> in(cin), eof; // cout << accumulate(in, eof ,0) << endl; // return 0; //} //#pragma GCC diagnostic error "-std=c++11" //#pragma GCC target("avx") //#pragma GCC optimize(1) //#pragma GCC optimize(2) //#pragma GCC optimize(3) //#pragma GCC optimize("Ofast") //#pragma GCC optimize("inline") //#pragma GCC optimize("-fgcse") //#pragma GCC optimize("-fgcse-lm") //#pragma GCC optimize("-fipa-sra") //#pragma GCC optimize("-ftree-pre") //#pragma GCC optimize("-ftree-vrp") //#pragma GCC optimize("-fpeephole2") //#pragma GCC optimize("-ffast-math") //#pragma GCC optimize("-fsched-spec") //#pragma GCC optimize("unroll-loops") //#pragma GCC optimize("-falign-jumps") //#pragma GCC optimize("-falign-loops") //#pragma GCC optimize("-falign-labels") //#pragma GCC optimize("-fdevirtualize") //#pragma GCC optimize("-fcaller-saves") //#pragma GCC optimize("-fcrossjumping") //#pragma GCC optimize("-fthread-jumps") //#pragma GCC optimize("-funroll-loops") //#pragma GCC optimize("-fwhole-program") //#pragma GCC optimize("-freorder-blocks") //#pragma GCC optimize("-fschedule-insns") //#pragma GCC optimize("inline-functions") //#pragma GCC optimize("-ftree-tail-merge") //#pragma GCC optimize("-fschedule-insns2") //#pragma GCC optimize("-fstrict-aliasing") //#pragma GCC optimize("-fstrict-overflow") //#pragma GCC optimize("-falign-functions") //#pragma GCC optimize("-fcse-skip-blocks") //#pragma GCC optimize("-fcse-follow-jumps") //#pragma GCC optimize("-fsched-interblock") //#pragma GCC optimize("-fpartial-inlining") //#pragma GCC optimize("no-stack-protector") //#pragma GCC optimize("-freorder-functions") //#pragma GCC optimize("-findirect-inlining") //#pragma GCC optimize("-fhoist-adjacent-loads") //#pragma GCC optimize("-frerun-cse-after-loop") //#pragma GCC optimize("inline-small-functions") //#pragma GCC optimize("-finline-small-functions") //#pragma GCC optimize("-ftree-switch-conversion") //#pragma GCC optimize("-foptimize-sibling-calls") //#pragma GCC optimize("-fexpensive-optimizations") //#pragma GCC optimize("-funsafe-loop-optimizations") ///#pragma GCC optimize("inline-functions-called-once") //#pragma GCC optimize("-fdelete-null-pointer-checks") //#include <bits/stdc++.h> //using namespace std; //int main() { // int a, b; scanf("%d%d", &a, &b); // printf("%d", a + b); // return 0; //}

            • -1
              @ 2024-4-25 19:46:02

              `//求一个赞`` #include <bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; cout <<a+b<<endl; return 0; }

              
              
              • -1
                @ 2024-4-14 11:15:37

                ?

                • -1
                  @ 2024-3-22 19:16:03

                  #include <iostream> using namespace std; int man() { cout << 2; return 0; }

                  • -1
                    @ 2024-3-21 19:23:56

                    image.png

                    • -1
                      @ 2024-3-21 19:23:52

                      image.png

                      • -1
                        @ 2024-3-18 20:44:41
                        #include<bits/stdc++.h>
                        using namespace std;
                        int main()
                        {
                            int a,b;
                            cin>>a>>b;
                            cout<<a+b<<" ";
                        
                        
                            return 0;
                        }
                        
                        • -1
                          @ 2024-3-7 15:39:39

                          #include<bits/stdc++.h> using namespace std; int a,b; int main(){ cin>>a>>b; cout<<a+b; return 0; }

                          • -1
                            @ 2024-3-7 15:39:33

                            很简单 #include<<iostream>iostream> using namespace std; int main() { int a,b; cin>>a>>b; cout<<a+b; return 0; }

                            • -1
                              @ 2024-3-2 13:55:47

                              6

                              • -1
                                @ 2024-2-25 18:00:01
                                #include<bits/stdc++.h>
                                using namespace std;
                                int main(){
                                    int a,b;
                                    cin>>a>>b;
                                    a=a+b;
                                    cout<<a;
                                    return 0;
                                }
                                
                                # 点个赞吧!干货而已。😄 
                                
                                • -1
                                  @ 2024-2-25 16:35:24

                                  ???

                                  • -1
                                    @ 2024-2-24 12:31:13

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

                                    • -1
                                      @ 2024-2-20 19:58:09

                                      极简代码(Python 2) (正好是7个字符)

                                      print 7
                                      
                                      </span>
                                      • -1
                                        @ 2024-2-16 20:20:56
                                        #include <bits/stdc++.h> 
                                        using namespace std;
                                        int main()
                                        {
                                            int a,b
                                            cin>>a>>b
                                            cout>>a+b
                                            return 0;
                                        }
                                        

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

                                        信息

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