博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
The Easiest Problem
阅读量:2037 次
发布时间:2019-04-28

本文共 902 字,大约阅读时间需要 3 分钟。

题解:

莫名其妙的开瓶子??? 

/**@Author:   STZG*@Language: C++*/#include 
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
//#define DEBUG#define RI register intusing namespace std;typedef long long ll;//typedef __int128 lll;const int N=10000;const int MOD=1e9+7;const double PI = acos(-1.0);const double EXP = 1E-8;const int INF = 0x3f3f3f3f;int t,n,m,k,q;int a[N];int b[N];int c[N];int main(){#ifdef DEBUG freopen("input.in", "r", stdin); //freopen("output.out", "w", stdout);#endif scanf("%d",&n); int ans=0; for(int i = 1; i <=n; i++){ scanf("%d%d", &a[i],&b[i]); } for(int i = 1; i <=n; i++){ for(int j = 1; j <=n; j++){ if(b[i]==a[j]&&i!=j) c[j]=1; } } for(int i = 1; i <=n; i++){ ans+=c[i]; } cout << n-ans << endl; //cout << "Hello world!" << endl; return 0;}

 

转载地址:http://ufzof.baihongyu.com/

你可能感兴趣的文章
开源RPC(gRPC/Thrift)框架性能评测
查看>>
《hadoop学习》关于hdfs中的namenode和datanode详解
查看>>
FastDFS的一些总结
查看>>
HBase底层存储原理
查看>>
linux python 2.6安装 paramiko
查看>>
Python2.x中文乱码问题解决
查看>>
Undertow,Tomcat和Jetty服务器配置详解与性能测试
查看>>
jVM虚拟机调优指南
查看>>
MongoDB十分钟搞定CRUD
查看>>
异常处理@ExceptionHandler遇到的问题
查看>>
Storm框架基础(一)
查看>>
linux查看文件某个关键字
查看>>
Hive 快速入门(全面)
查看>>
Spring Cloud Gateway基于服务发现的默认路由规则
查看>>
Apache Flink 1.6.0 正式发布,涵盖多项重要更新
查看>>
SpringBoot集成自定义HandlerMethodArgumentResolver
查看>>
修改linux最大文件句柄数
查看>>
RocketMQ 自定义(日志)文件路径
查看>>
Guava学习笔记:Immutable(不可变)集合
查看>>
安装npm及cnpm(Windows)
查看>>