矩阵中不重复的元素

Posted NWU_ACM

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了矩阵中不重复的元素相关的知识,希望对你有一定的参考价值。

技术分享
 1 #include <bits/stdc++.h>
 2 #define _xx ios_base::sync_with_stdio(0);cin.tie(0);
 3 typedef long long ll;
 4 using namespace std;
 5 typedef long long ll;
 6 set<double> vis;
 7 int main()
 8 {_xx
 9     int n, m, a, b;
10     while(cin >> m >> n >> a >> b)
11     {
12         vis.clear();
13         for(int i = 0; i < m; i++)
14         {
15             for(int j = 0; j < n; j++)
16             {
17                 double t = (b + i)*log(a + j)*1000000;
18                 vis.insert((ll)t);
19             }
20         }
21         cout << vis.size() << endl;
22     }    
23 }
View Code

 

以上是关于矩阵中不重复的元素的主要内容,如果未能解决你的问题,请参考以下文章