7 条题解

  • 0
    @ 2026-4-21 14:02:05

    91919191919191919191919191919

    • 0
      @ 2026-4-21 14:01:51

      111

      • 0
        @ 2026-4-17 16:05:37
        #include<bits/stdc++.h>
        using namespace std;
        int a[10010],f[10010];
        int main()
        {
        	ios::sync_with_stdio(0);
        	cin.tie(0);
        	cout.tie(0);
        	int n;
        	cin>>n;
        	for(int i=1;i<=n;i++)
        		cin>>a[i];
        	memset(f,0,sizeof f);
        	f[1]=a[1];
        	f[2]=a[2];
        	f[3]=a[3];
        	for(int i=4;i<=n;i++)
        		f[i]=min(f[i-2],min(f[i-1],f[i-3]))+a[i];
        	cout<<min(f[n],min(f[n-1],f[n-2]));
        	return 0;
        }
        
        • 0
          @ 2026-4-13 17:47:44

          100分

          #include <iostream>
          using namespace std;
          int main() {
              int a,b;
              while (cin >> a >> b) {
                  cout << a+b << endl;
              }
          	return 0;
          }
          
          
          
          • 0
            @ 2026-3-19 18:34:40

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

            • 0
              @ 2025-11-29 11:46:55

              ruaoj 再出几道题 thanks

              • 0
                @ 2025-11-24 15:05:26

                C :

                #include <stdio.h>
                int main()
                {
                int a,b;
                while(scanf("%d %d",&a, &b) != EOF)
                printf("%d\n",a+b);
                return 0;
                }
                

                C++ :

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

                Pascal :

                var 
                  a,b:longint;
                begin
                  while not(eof) do
                     begin
                       readln(a,b);
                       writeln(a+b);
                     end;
                end.
                

                Java :

                import java.util.*;
                public class Main {
                	public static void main(String args[]) {
                		Scanner cin = new Scanner(System.in);
                		int a, b;
                		while (cin.hasNext()) {
                			a = cin.nextInt(); 
                			b = cin.nextInt();
                			System.out.println(a + b);
                		}
                	}
                }
                

                Python :

                import sys
                for line in sys.stdin:
                    a = line.split()
                    print int(a[0]) + int(a[1])
                

                PHP :

                <?php
                echo "6\n30";
                ?>
                

                Perl :

                #! /usr/bin/perl -w
                while(<>){
                  chomp;
                  ($a,$b)=split(/\s/,$_);
                  printf "%d\n",$a+$b;
                }
                

                C# :

                using System;
                using System.Collections.Generic;
                using System.Linq;
                using System.Text;
                using System.IO;
                
                namespace ConsoleApplication3
                {
                    class Program
                    {
                        static void Main(string[] args)
                        {
                            string s ;
                            for (; ; ) 
                            {
                                s = Console.ReadLine();
                                if (s == null)
                                    break;
                                string[] words = new string[2];
                                words = s.Split(new char[] { ' ' });
                                Console.WriteLine("{0}", int.Parse(words[0]) + int.Parse(words[1]));
                            }
                        }
                    }
                }
                
                • 1

                信息

                ID
                370
                时间
                2000ms
                内存
                32MiB
                难度
                6
                标签
                递交数
                76
                已通过
                26
                上传者