18 条题解

  • 1
    @ 2025-11-26 17:23:21

    **SU </u>

    • 0
      @ 2026-4-12 10:49:08

      #include<bits/stdc++.h> using namespace std; string s; int main(){ while(getline(cin,s)){ string a(s.size(),' '); stack sta; for(int i=0;i<s.size();++i){ if(s[i]'(') { sta.push(i); } else if(s[i]')'){ if(sta.empty()){ a[i]='?'; } else{ sta.pop(); } } } while(!sta.empty()){ int i=sta.top(); sta.pop(); a[i]='$'; } cout<<s<<endl; cout<<a<<endl; } return 0; }

      • 0
        @ 2026-4-12 10:48:40

        #include<bits/stdc++.h> using namespace std; string s; int a,m; int main(){ cin>>a; while(a--){ cin>>s; m=s.size()-1; bool flag=0; stack a; for(int i=0;i<=m;i++){ if(s[i]'('||s[i]'{'||s[i]'[') a.push(s[i]); else{ if(a.size()&&a.top()'('&&s[i]')'||a.size()&&a.top()'['&&s[i]==']')a.pop(); else{ flag=1; break; } }
        } if(flag||a.size()) cout<<"No\n"; else cout<<"Yes\n"; } return 0; }

        • 0
          @ 2026-2-12 21:15:33

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

          • 0
            @ 2026-2-12 21:15:18

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

            • 0
              @ 2025-11-17 17:21:32

              #include using namespace std; int main(){ int m,n,cnt=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(i%2==1){ cnt+=i; } } cout<<cnt; return 0; }

              • @ 2025-11-17 17:22:20

                #include using namespace std; int main(){ int m,n,cnt=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(i%2==1){ cnt+=i; } } cout<<cnt; return 0; }

            • 0
              @ 2025-9-28 17:26:10

              6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666

              • 0
                @ 2025-9-28 17:25:20
                #include <iostream>
                using namespace std;
                int main(){
                	cout << "Hello,World!";
                	return 0;
                }
                
                
                • 0
                  #include<bits/stdc++.h>
                  using namespace std;
                  int main(){
                      cout<<"Hello,World!";
                      return 0;
                  }
                  

                  点个赞再拿走吧

                • -1
                  @ 2025-11-17 17:27:27

                  #include using namespace std; int main(){ int m,n,cnt=0; cin>>m>>n; for(int i=m;i<=n;i++){ if(i%2==1){ cnt+=i; } } cout<<cnt; return 0; }

                  • -1
                    @ 2025-7-24 13:18:56
                    #include<iostream>
                    using namespace std;
                    int main() {
                    cout<<"Hello,World!";
                    
                        return 0;
                    }
                    
                    
                    
                    • -1
                      @ 2025-7-15 15:38:57

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

                      • -1
                        @ 2025-3-15 8:48:47

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

                        • -2
                          @ 2025-11-17 17:19:08

                          ghddhgjhgjdghkfghkgfjkhgjg~~gfdk**gfsjdgkdgfhsggjckjgkjhgddhgdjhgjhgfjhgdjhgkfjkjjf*jfkhkjjkg</s>hgkjghkhf~~</strong></u>~~</em>*</u>~~

                          • -2
                            @ 2025-7-31 14:22:35

                            #include using namespace std;

                            // main ()

                            int main() { cout <<"Hello,World!";
                            return 0; } 点个赞再拿走吧

                            • -5
                              @ 2025-5-18 16:26:04

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

                              • -5
                                @ 2025-3-5 16:22:11

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

                                • -6
                                  @ 2025-3-5 16:22:57

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

                                  • 1

                                  信息

                                  ID
                                  2
                                  时间
                                  1000ms
                                  内存
                                  256MiB
                                  难度
                                  1
                                  标签
                                  递交数
                                  1080
                                  已通过
                                  207
                                  上传者