社区讨论

求USACO银组第二题题意

学术版参与者 4已保存回复 3

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
3 条
当前快照
1 份
快照标识符
@lq7xhw13
此快照首次捕获于
2023/12/16 18:41
2 年前
此快照最后确认于
2023/12/16 18:44
2 年前
查看原帖
翻译软件用了还是看不懂,循环(cycle)到底是什么意思,标签(label)又是怎么贴的?
附题目: Farmer John has N barns (3≤N≤5⋅105), of which K (3≤K≤N) distinct pairs of barns are connected.
First, Annabelle assigns each barn a distinct integer label in the range [1,N] , and observes that the barns with labels a1,…,aK are connected in a cycle, in that order. That is, barns ai and ai+1 are connected for all 1≤i<K , and barns aK and a1 are also connected. All ai are distinct.
Next, Bessie also assigns each barn a distinct integer label in the range [1,N] and observes that the barns with labels b1,…,bK are connected in a cycle, in that order. All b i are distinct.
Some (possibly none or all) barns are assigned the same label by Annabelle and Bessie. Compute the maximum possible number of barns that are assigned the same label by Annabelle and Bessie.

回复

3 条回复,欢迎继续交流。

正在加载回复...