134 条题解

  • -7
    @ 2024-9-12 21:46:31

    题解

    思路

    无,直接输出 Hello, MXOJ!\texttt{Hello, MXOJ!}

    解题方法

    无,直接输出 Hello, MXOJ!\texttt{Hello, MXOJ!}

    复杂度

    时间复杂度:

    添加时间复杂度, 示例: O(1)O(1)

    空间复杂度:

    添加空间复杂度, 示例: O(1)O(1)

    Code

    print("Hello, MXOJ!")
    
    • -7
      @ 2024-9-12 20:15:09

      解题方法

      直接cout << "Hello, MXOJ!"

      复杂度

      时间复杂度:

      时间复杂度, O(1)O(1)

      空间复杂度:

      空间复杂度, O(1)O(1)

      Code

      #include <iostream>
      using namespace std;
      int main(){
          cout << "Hello, MXOJ!";
          return 0;
      }
      
      • -7
        @ 2024-9-12 18:24:56

        Code

        #include<bits/stdc++.h>
        #define _ "Hello, MXOJ!"
        #define __ using
        #define ___ namespace
        #define ____ std;
        #define _____ int
        #define ______ main()
        #define _______ cout<<_;
        #define ________ return
        #define _________ 0;
        
        __ ___ ____
        _____ ______{
            _______
            ________ _________
        }
        
        • -7
          @ 2024-9-8 20:04:36

          方法

          直接输出即可

          • -7
            @ 2024-9-8 17:14:39

            直接输出即可。

            • -7
              @ 2024-9-8 16:11:27

              标题

              思路

              cout

              解题方法

              直接输出

              Code

              #include<bits/stdc++.h> using namespace std;

              int main(){ cout<<"Hello, MXOJ!"; return 0; }

              • -7
                @ 2024-9-3 12:23:15

                标题

                思路

                解题方法

                复杂度

                时间复杂度:

                O(1)O(1)

                空间复杂度:

                O(1)O(1)

                Code

                #include<bits/stdc++.h> using namespace std; int main(){ cout<<"Hello, MXOJ!"; }

                • -7
                  @ 2024-8-31 11:35:59

                  只要使用python简单的打印Hello, MXOJ!即可 时空都应该是O(1)O(1)

                  Code

                  print('Hello, MXOJ!')
                  
                  • -7
                    @ 2024-8-26 20:22:20

                    思路

                    只需要输出Hello, MXOJ!就可以。

                    Code

                    #include<bits/stdc++.h> using namespace std; int main() { printf("Hello, MXOJ!"); return 0; }

                    • -7
                      @ 2024-8-26 11:57:59

                      标题

                      思路

                      解题方法

                      复杂度

                      时间复杂度:

                      添加时间复杂度, 示例: O(n)O(n)

                      空间复杂度:

                      添加空间复杂度, 示例: O(n)O(n)

                      Code

                      • -7
                        @ 2024-8-25 23:25:23

                        A1题解

                        警告:此题解非正常题解,请不要以此作为标准

                        解题方法

                        使用c++11新特性:可变参数模板

                        先定义了一个可以打印vector,array,initializer_list中内容的函数print()

                        随后在main中分别定义"Hello MXOJ!\n"字符串拆解后的内容

                        最后调用print()函数输出即可

                        Code

                        #include <bits/stdc++.h>
                        using namespace std;
                        void print() {}// 终止条件
                        template<typename T, size_t N>
                        void print(const array<T, N>& arr) {
                            for (const auto& val : arr) {
                                cout << val;
                            }
                        }
                        template<typename T>
                        void print(const vector<T>& vec) {
                            for (const auto& val : vec) {
                                cout << val;
                            }
                        }
                        template<typename T>
                        void print(const initializer_list<T>& init_list) {
                            for (const auto& val : init_list) {
                                cout << val;
                            }
                        }
                        template<typename T>
                        void print(const T& val) {
                            cout << val;
                        }
                        template<typename T, typename... Types>
                        void print(const T& val, const Types&... args) {
                            print(val);
                            print(args...);
                        }
                        int main() {
                            ios::sync_with_stdio(0);
                            cin.tie(nullptr);
                            cout.tie(NULL);
                            array<char, 6> hello = {'H', 'e', 'l', 'l', 'o', ','};
                            string space(" ");
                            vector<char> mx(2, 'M');
                            mx.at(1) = 'X';
                            initializer_list<char> oj = {'O', 'J', '!'};
                            #define ENTER '\n'
                            print(hello, space, mx, oj, ENTER);
                            return 0;
                        }
                        
                        • -7
                          @ 2024-8-25 10:47:46

                          标题

                          思路

                          直接输出

                          解题方法

                          复杂度

                          时间复杂度:

                          O(1)O(1)

                          空间复杂度:

                          O(1)O(1)

                          Code

                          • -7
                            @ 2024-8-16 18:56:51

                            Hello, MXOJ!

                            使用最简单的cout

                            是个人都会

                            复杂度 你猜!

                            时间复杂度:O(1)

                            空间复杂度:O(0)

                            Code

                            #include<bits/stdc++.h> using namespace std; int main(){ cout<<"Hello, MXOJ!"; return 0; }

                            • -7
                              @ 2024-8-14 21:48:23

                              #define大法好

                              #include<bits/stdc++.h>
                              using namespace std;
                              #define qaq "Hello, MXOJ!"
                              int main(){
                                  printf(qaq);
                              }
                              • -7
                                @ 2024-8-13 9:10:18

                                一种新奇的解题思路

                                思路

                                在PHP中,什么也不做相当于输出

                                解题方法

                                复杂度

                                时间复杂度:

                                时间复杂度:O(1)O(1)

                                空间复杂度:

                                空间复杂度:O(0)O(0)

                                Code

                                Hello, MXOJ!

                                • -7
                                  @ 2024-8-12 14:38:19

                                  HELLO,MXOJ

                                  思路

                                  cout

                                  时间复杂度:

                                  时间复杂度O(1)O(1)

                                  空间复杂度:

                                  添加空间复杂度, 示例: O(0)O(0)

                                  Code

                                  #include<bits/stdc++.h>
                                  using namespace std;
                                  int main(){
                                  	cout<<"HELLO,MXOJ"<<endl;
                                      return 0;
                                  }
                                  
                                  • -7
                                    @ 2024-8-7 11:10:27

                                    Python3方便

                                    print("Hello, MXOJ!")

                                    完结撒花

                                    • -7
                                      @ 2024-8-6 20:40:04

                                      思路

                                      cout cout 输出就好了

                                      解题方法

                                      直接 cout cout

                                      复杂度

                                      时间复杂度:

                                      O(1)O(1)

                                      Code

                                      #include<bits/stdc++.h>
                                      using namespace std;
                                      int main()
                                      {
                                          cout<<"Hello, MXOJ!";
                                          return 0;
                                      }
                                      
                                      • -7
                                        @ 2024-8-6 19:38:17

                                        MXOI A1 题解

                                        前言

                                        第一次注册,正好看看这 markdown 好不好用。

                                        思路

                                        观察到需要让你输出 Hello, MXOJ!,输出即可。

                                        解题方法

                                        最简单的,使用 cout

                                        当然你也可以用别的方式,能 AC 即可。

                                        时间复杂度

                                        显而易见的,O(1)O(1)

                                        Code

                                        #include<stdio.h>
                                        #include<bits/stdc++.h>
                                        #define N 1000010
                                        #define MOD 998244353
                                        #define esp 1e-8
                                        #define INF 999999999999999999
                                        #define LL long long
                                        #define rep(i,a,b,g) for(LL i=a;i<=b;i+=g)
                                        #define rem(i,a,b,g) for(LL i=a;i>=b;i-=g)
                                        #define repn(i,a,b,g) for(LL i=a;i<b;i+=g)
                                        #define remn(i,a,b,g) for(LL i=a;i>b;i-=g)
                                        #define pll pair<LL,LL>
                                        #define mkp(x,y) make_pair(x,y)
                                        #define i128 __int128
                                        #define lowbit(x) ((x)&(-(x)))
                                        #define lc (u<<1)
                                        #define rc (u<<1|1)
                                        using namespace std;
                                        void read(i128 &x)
                                        {
                                            x=0;
                                            i128 f=1;
                                            char ch=getchar();
                                            while(ch<'0'||ch>'9')
                                            {
                                                if(ch=='-')f=-1;
                                                ch=getchar();
                                            }
                                        	while(ch>='0'&&ch<='9')
                                        	{
                                        		x=(x<<1)+(x<<3)+(ch^48);
                                        		ch=getchar();
                                        	}
                                        	x*=f;
                                        }
                                        void write(i128 x)
                                        {
                                            if(x<0)
                                            {
                                            	x=-x;
                                            	putchar('-');
                                            }
                                            if(x>9)write(x/10);
                                            putchar((x%10)^48);
                                        }
                                        int main()
                                        {
                                            cout<<"Hello, MXOJ!"<<endl;
                                        	return 0;
                                        }
                                        
                                      • -7
                                        @ 2024-8-5 15:11:05

                                        HELLO,MXOJ!

                                        解决方法:

                                        直接按题目意思输出即可。
                                        时间复杂度:O(1)O(1)
                                        二话不多说,直接上代码。

                                        #include<iostrem>
                                        using namespace std;
                                        int main() {
                                            cout<<"Hello, MXOJ!"<<endl;
                                            return 0;
                                        }
                                        

                                        信息

                                        ID
                                        1
                                        时间
                                        1000ms
                                        内存
                                        512MiB
                                        难度
                                        1
                                        标签
                                        (无)
                                        递交数
                                        3090
                                        已通过
                                        1524
                                        上传者