还是free pascal简单些。。。

主程序
read(a,b);
write(a+b);

5 条评论

  • @ 2016-10-04 10:57:57

    .......

  • @ 2016-10-02 19:56:35
    #include <vector>
    #include <cstring>
    #include <cstdio>
    #include <queue>
    using std :: vector;
    using std :: priority_queue;
    typedef long long LL;
    struct Edge {
      LL from,to,dist;
      Edge(int u,int v,int d):from(u),to(v),dist(d){}
    };
    struct HeapNode {
      LL d,u;
      bool operator < (const HeapNode& cmp) const {
        return d > cmp.d;
      }
    };
    struct Dijkstra {
      LL n,m;
      vector <Edge> edges;
      vector <LL> G[3];
      bool vis[3];
      LL dis[3],p[3];
      void init() {
        for (LL i = 0;i < 3;i++) G[i].clear();
        edges.clear();
      }
      void add(LL from,LL to,LL dist) {
        edges.push_back(Edge(from,to,dist));
        m = edges.size();
        G[from].push_back(m-1);
      }
      LL dijkstra(LL s,LL t) {
        priority_queue <HeapNode> Q;
        for (int i = 0;i < 3;i++) dis[i] = 999999999;
        dis[s] = 0;
        memset(vis,false,sizeof(vis));
        Q.push((HeapNode){0,s});
        while (Q.size()) {
          HeapNode x = Q.top();
          Q.pop();
          LL u = x.u;
          if (vis[u]) continue;
          vis[u] = true;
          for (LL i = 0;i < G[u].size();i++) {
            Edge e = edges[G[u][i]];
            if (dis[e.to] > dis[u]+e.dist) {
              dis[e.to] = dis[u]+e.dist;
              p[e.to] = G[u][i];
              Q.push((HeapNode){dis[e.to],e.to});
            }
          }
        }
        return dis[t];
      }
    }lrj;
    int main() {
      LL a,b;
      scanf("%lld%lld",&a,&b);
      lrj.add(0,1,a);
      lrj.add(1,2,b);
      printf("%lld",lrj.dijkstra(0,2));
    }
    
  • @ 2016-10-02 19:54:52

    #include<cstdio>
    main(){int a,b;scanf("%d %d",&a,&b);printf("%d",a+b);}

  • @ 2016-09-27 18:46:50

    type
    xp=array[1..2,3..4,5..6,7..8,9..10] of longint;
    var
    a:xp;
    begin
    read(a[1,3,5,7,9],a[2,4,6,8,10]);
    writeln(a[1,3,5,7,9]+a[2,4,6,8,10]);
    end.

  • @ 2016-09-27 18:46:42

    type
    xp=array[1..2,3..4,5..6,7..8,9..10] of longint;
    var
    a:xp;
    begin
    read(a[1,3,5,7,9],a[2,4,6,8,10]);
    writeln(a[1,3,5,7,9]+a[2,4,6,8,10]);
    end.

  • 1

信息

ID
1000
难度
9
分类
(无)
标签
(无)
递交数
74397
已通过
28465
通过率
38%
被复制
222